<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: AMAR SINGH</title>
    <description>The latest articles on DEV Community by AMAR SINGH (@amarsingh).</description>
    <link>https://dev.to/amarsingh</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F867671%2F6967583c-d5be-40df-84a8-35b0ef35f6fc.png</url>
      <title>DEV Community: AMAR SINGH</title>
      <link>https://dev.to/amarsingh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/amarsingh"/>
    <language>en</language>
    <item>
      <title>Pushing folders from local pc to GitHub using Git</title>
      <dc:creator>AMAR SINGH</dc:creator>
      <pubDate>Fri, 24 Jun 2022 12:42:46 +0000</pubDate>
      <link>https://dev.to/amarsingh/pushing-files-from-local-pc-to-github-using-git-3ib6</link>
      <guid>https://dev.to/amarsingh/pushing-files-from-local-pc-to-github-using-git-3ib6</guid>
      <description>&lt;p&gt;Hello all,&lt;br&gt;
In this post, I will be explaining the procedure to push our local projects, files etc to a GitHub repository in simple and elegant way!&lt;br&gt;
First of all make sure to install Git in your computer and link your email and other things to it!&lt;/p&gt;

&lt;p&gt;Now, head toward that folder which you want to push there on GitHub.&lt;br&gt;
Then, Follow following steps-&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open Git Bash in that particular folder.&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;git init&lt;/code&gt;   &lt;em&gt;(this will make that folder a repository)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;git add .&lt;/code&gt;  &lt;em&gt;(this will add all files to the repository)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;git commit -m "Intial commit msg"&lt;/code&gt;   &lt;em&gt;(all files now in repository)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;git status&lt;/code&gt;  &lt;em&gt;(you will get a msg "Working tree clean")&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These are the steps which are used to make a local repository, now to push the same to a GitHub repository we use following steps-&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open your GitHub profile and create a New Repository.&lt;/li&gt;
&lt;li&gt;Copy the SSH Key of that created repository.&lt;/li&gt;
&lt;li&gt;Open Git Bash in that particular folder which you want to push.&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;git remote add origin PASTE_SSH_KEY_OF_CREATED_REPO&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;git push origin main --force&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This will successfully push that folder to your GitHub account.&lt;br&gt;
Thank You :)&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>github</category>
      <category>git</category>
      <category>developer</category>
    </item>
  </channel>
</rss>
