<?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: Neal Onyango</title>
    <description>The latest articles on DEV Community by Neal Onyango (@neal_onyango_ebe0034528d6).</description>
    <link>https://dev.to/neal_onyango_ebe0034528d6</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%2F4071741%2F463ab37d-2451-417e-bf02-0ddb8f4dcd4a.png</url>
      <title>DEV Community: Neal Onyango</title>
      <link>https://dev.to/neal_onyango_ebe0034528d6</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/neal_onyango_ebe0034528d6"/>
    <language>en</language>
    <item>
      <title>PUSHING FOLDERS TO GITHUB USING SSH</title>
      <dc:creator>Neal Onyango</dc:creator>
      <pubDate>Sun, 23 Aug 2026 09:55:00 +0000</pubDate>
      <link>https://dev.to/neal_onyango_ebe0034528d6/pushing-folders-to-github-using-ssh-9n0</link>
      <guid>https://dev.to/neal_onyango_ebe0034528d6/pushing-folders-to-github-using-ssh-9n0</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Pushing is the process of uploading a folder saved on a local repository to an online repository which can be accessed remotely. The online repository may be public or private. &lt;br&gt;
This article is a step by step explanation of how to push projects from your local folder to GitHub on windows operating system. We shall use GitBash to write command line instructions and SSH key to securely link our GitHub account to GitBash without needing to type a username and password every time we push.&lt;/p&gt;

&lt;p&gt;By end of this guide, you will be able to create a project folder, initialize it as a Git repository, connect it to GitHub over SSH and push your work online.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Git, GitHub, GitBash and SSH?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Git&lt;/strong&gt; is a control software which tracks changes to files over time, letting you save edits (commits) and go back to earlier versions.&lt;br&gt;
&lt;strong&gt;GitHub&lt;/strong&gt; is an online platform that hosts Git repositories. This is where your pushed documents are found and it enables access to your documents remotely and by other people.&lt;br&gt;
&lt;strong&gt;GitBash&lt;/strong&gt; is a terminal that lets one run Git commands in a command line language environment.&lt;br&gt;
&lt;strong&gt;SSH&lt;/strong&gt;(Secure Shell) is a key that lets your computer to communicate with GitHub securely. This connection enables GitBash to push or pull without the need for prompting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before starting the push process, make sure you have the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Log in to your GitHub account. If you don’t have one, create it at GitHub.com.&lt;/li&gt;
&lt;li&gt;Download GitBash from the official GIT website.&lt;/li&gt;
&lt;li&gt;Correctly configure GitBash with your identity by running the command &lt;strong&gt;git config --global user.name "Your Name"&lt;/strong&gt; and &lt;strong&gt;git config --global user.email &lt;code&gt;"your-email@example.com"&lt;/code&gt;&lt;/strong&gt;. This information is attached to every commit you make so GitHub and your collaborators know who the author is.&lt;/li&gt;
&lt;li&gt;To set up your branch use the command &lt;strong&gt;git config —-global init.defaultBranch main&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Confirm that your configuration was saved correctly by running &lt;strong&gt;git config --global --list&lt;/strong&gt;. It should appear as below.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3154i19m5skrsdd0m2sp.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3154i19m5skrsdd0m2sp.jpeg" alt=" " width="556" height="84"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup your SSH key.
&lt;/h2&gt;

&lt;p&gt;This is the step that allows your computer to communicate with GitHub. You only need to do this once.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open GitBash and generate a new SSH key, replacing the email with the one linked to your GitHub account using the command &lt;strong&gt;ssh-keygen -t ed25519 -C “email”&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Confirm the key was created using &lt;strong&gt;ls -al ~/.ssh&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;You should see the following files: 

&lt;ul&gt;
&lt;li&gt;id_ed25519(This is your private key, do not share it with anyone.)&lt;/li&gt;
&lt;li&gt;id_ed25519.pub(This is your public key)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpy0h319th3uo9vlemg6e.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpy0h319th3uo9vlemg6e.jpeg" alt=" " width="600" height="126"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;To display the SSH key use &lt;strong&gt;cat ~/.ssh/id_ed25519.pub&lt;/strong&gt; and then highlight the entire output and copy it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;On GitHub, go to Settings then SSH and GPG keys where you will select new SSH key. Give it a descriptive title and paste your public key into the key field and add SSH key.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fri9v4s3w47dujm5zmzi9.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fri9v4s3w47dujm5zmzi9.jpeg" alt=" " width="799" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwdmyb4irp7s0ixsinyzr.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwdmyb4irp7s0ixsinyzr.jpeg" alt=" " width="800" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Test the connection on GitBash using &lt;strong&gt;ssh -T &lt;code&gt;git@github.com&lt;/code&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv7r9xz02drdnmshro3fr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv7r9xz02drdnmshro3fr.png" alt=" " width="800" height="91"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a local project folder and documents
&lt;/h2&gt;

&lt;p&gt;If you don’t have a project folder, here is how to create one.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Navigate to the location where you want to save the project(we will use the desktop as an example) using the command &lt;strong&gt;cd ~/Desktop&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Create a new folder for the project using &lt;strong&gt;mkdir my-first-project&lt;/strong&gt; (Note: spaces will not work unless you use speech marks “”)&lt;/li&gt;
&lt;li&gt;Move into that folder using &lt;strong&gt;cd my-first-project&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Create a new document inside the folder. Use the command &lt;strong&gt;touch README.md&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi0hj8lq5vbi9u7k9lojj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi0hj8lq5vbi9u7k9lojj.png" alt=" " width="799" height="242"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To confirm that the document is within the folder use the command &lt;strong&gt;ls&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;To add content to the document you can either use the command &lt;strong&gt;echo “Text” &amp;gt;&amp;gt; README.md&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgzf211ljg2584ucz87r6.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgzf211ljg2584ucz87r6.jpeg" alt=" " width="695" height="161"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For longer text, open an editor using the command &lt;strong&gt;nano README.md&lt;/strong&gt;. Save the work using Ctrl+O and then close it using Ctrl+X&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3vao6vz7vegrooj1y138.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3vao6vz7vegrooj1y138.jpeg" alt=" " width="715" height="120"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzc6nexqlz3io9z4extwb.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzc6nexqlz3io9z4extwb.jpeg" alt=" " width="799" height="426"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use the command &lt;strong&gt;cat README.md&lt;/strong&gt; to view what has been added.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ficnfnnhxfafrrer6qgj1.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ficnfnnhxfafrrer6qgj1.jpeg" alt=" " width="714" height="134"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Push Process
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Confirm your current working directory by running the command &lt;strong&gt;pwd&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Use the command &lt;strong&gt;ls -la&lt;/strong&gt; to see all files hidden and non-hidden files.&lt;/li&gt;
&lt;li&gt;If you are not in the directory of the folder you are looking for, use the command &lt;strong&gt;cd&lt;/strong&gt; to move until the correct directory.&lt;/li&gt;
&lt;li&gt;Initialize the directory a GIT repository so GIT may begin managing the project using the command &lt;strong&gt;git init&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fclyewe4h6gf8j995cx5z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fclyewe4h6gf8j995cx5z.png" alt=" " width="800" height="281"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stage your file so Git starts tracking using the command &lt;strong&gt;git add .&lt;/strong&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo0jpawmejwxzqz908hen.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo0jpawmejwxzqz908hen.png" alt=" " width="800" height="75"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Commit the staged files with a message describing the changes using &lt;strong&gt;git commit -m “&lt;em&gt;description&lt;/em&gt;”&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Open GitHub and create an empty GitHub repository, name the repository, leave README off and then choose the visibility of your repository. Afterwards, click create repository &lt;/li&gt;
&lt;li&gt;Under quick setup, select SSH as your connection option.&lt;/li&gt;
&lt;li&gt;Copy the SSH repository address and then on GIT bash, type the command &lt;strong&gt;git remote add origin &lt;em&gt;pasted SSH repository address&lt;/em&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Confirm the remote is correct using the command &lt;strong&gt;git remote -v&lt;/strong&gt; (This displays the URL you just added)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F26wspz1ap3uy9vp0r1xu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F26wspz1ap3uy9vp0r1xu.png" alt=" " width="779" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can now push the project using &lt;strong&gt;git push -u origin main&lt;/strong&gt;(The -u flag sets origin main as the default)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4l36w4exrgj7r583yc4h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4l36w4exrgj7r583yc4h.png" alt=" " width="776" height="285"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Refresh the repository page on GitHub to see your pushed folder&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Verifying your push was successful
&lt;/h2&gt;

&lt;p&gt;A quick check to confirm your push actually worked.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run the command &lt;strong&gt;git status&lt;/strong&gt; in GitBash. If everything is pushed correctly, you should see the following message, “Your branch is up to date with ‘origin/main.”&lt;/li&gt;
&lt;li&gt;Run the command &lt;strong&gt;git log —-oneline&lt;/strong&gt; to see the commits history.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F04xtyqz8bho85hlxct3n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F04xtyqz8bho85hlxct3n.png" alt=" " width="783" height="263"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This is the entire workflow of creating a project, setting up SSH and pushing a local project to GitHub using SSH on Windows. Setting up the SSH key is a one time process and you won’t have to re enter the credentials every time you push. This is the cycle which you will repeat for every change you make.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>git</category>
      <category>github</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
