<?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: judysoukkhaphon</title>
    <description>The latest articles on DEV Community by judysoukkhaphon (@judysoukkhaphon).</description>
    <link>https://dev.to/judysoukkhaphon</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1006562%2F148afdc7-f7e6-41c4-ab4e-d7a4f5b3389e.png</url>
      <title>DEV Community: judysoukkhaphon</title>
      <link>https://dev.to/judysoukkhaphon</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/judysoukkhaphon"/>
    <language>en</language>
    <item>
      <title>Pushing Local Project to Github for the First Time</title>
      <dc:creator>judysoukkhaphon</dc:creator>
      <pubDate>Sat, 25 Mar 2023 08:32:02 +0000</pubDate>
      <link>https://dev.to/judysoukkhaphon/pushing-local-project-to-github-2ki</link>
      <guid>https://dev.to/judysoukkhaphon/pushing-local-project-to-github-2ki</guid>
      <description>&lt;p&gt;&lt;a href="https://docs.github.com/en/migrations/importing-source-code/using-the-command-line-to-import-source-code/adding-locally-hosted-code-to-github#adding-a-local-repository-to-github-using-git"&gt;Source&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;1) &lt;strong&gt;Create a new repository on Github.com&lt;/strong&gt;&lt;br&gt;
You'll do this on the website.&lt;/p&gt;

&lt;p&gt;2) &lt;strong&gt;In the terminal navigate to your projects directory&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;3) &lt;strong&gt;Initialize the local directory as a Git repository.&lt;/strong&gt; &lt;br&gt;
This is like making your local project compatible with Github.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4) &lt;strong&gt;Add and Commit files.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;"git add ."  tells git that you want it to look at all these files.&lt;/p&gt;

&lt;p&gt;"git commit -m" tells git that you want it to take a picture of those files and commit its current state to memory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git add .
$ git commit -m "comments on this commit"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;5) &lt;strong&gt;Copy the SSH-URL of the repository you created in Github.com&lt;/strong&gt;&lt;br&gt;
 (see differences between using the SSH-URL or the HTTPS URL)&lt;/p&gt;

&lt;p&gt;6) &lt;strong&gt;Connecting your project to your Github repository.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git remote add remoteName SSH-URL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This part is like creating a remote control for your project so that it can do stuff to a repository on Github.com. &lt;br&gt;
You "program the remote control" to work with a specific repository by supplying it with the URL that you copied. Since you will probably be making other remote controls for other projects and other repositories, you'll want to give this remote a unique name. Wouldn't it be annoying if all of your remote controls that you need for your TV, sound system, Roku, etc. all looked the same?&lt;/p&gt;

&lt;p&gt;7) &lt;strong&gt;You are now ready to "push" your project up to Github.com&lt;/strong&gt;&lt;br&gt;
This is where the picture that was taken by the commit command gets "pushed" by the remote control to the repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git push remoteName main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This line of code specifies the remote that you want to use, and what channel you want to go to. The save point that you committed to memory about your files is then sent to the "main" branch (or channel) of your repository and you'll now be able to see your project on Github.com.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.github.com/en/get-started/getting-started-with-git/managing-remote-repositories"&gt;Further Reading about managing remotes&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
