<?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: Samuel Mwaura Ndungu</title>
    <description>The latest articles on DEV Community by Samuel Mwaura Ndungu (@samuelmwaurandungu).</description>
    <link>https://dev.to/samuelmwaurandungu</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%2F4071845%2F613cfa3f-32a0-4a5d-8e6d-9bd33073ce16.jpg</url>
      <title>DEV Community: Samuel Mwaura Ndungu</title>
      <link>https://dev.to/samuelmwaurandungu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/samuelmwaurandungu"/>
    <language>en</language>
    <item>
      <title>My First GitHub Project: From a Local Folder To GitHub Using Git and SSH</title>
      <dc:creator>Samuel Mwaura Ndungu</dc:creator>
      <pubDate>Sun, 23 Aug 2026 06:59:23 +0000</pubDate>
      <link>https://dev.to/samuelmwaurandungu/my-first-github-project-from-a-local-folder-to-github-using-git-and-ssh-1dh6</link>
      <guid>https://dev.to/samuelmwaurandungu/my-first-github-project-from-a-local-folder-to-github-using-git-and-ssh-1dh6</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Data is captured in almost every aspects of our lives and it is recorded somewhere. It is important to analyse this data and transform the same to useful information which will be used for decision making. For this reason, I have realized it is important to have the right knowledge and tools to transform data into useful information and also present the same in a manner decision makers can understand. &lt;br&gt;
This article will explain step by step my first git hub project by creating a local folder, transferring the same to Github and sharing the same. The tools i will employ in my work include Git, Gitbash/template, Github among others.&lt;br&gt;
Git helps me track changes made in projects while Github helps one to share the project online.&lt;/p&gt;

&lt;h3&gt;
  
  
  Understanding Git
&lt;/h3&gt;

&lt;p&gt;Its very important to understand what is git and its importance in coming up with my project.&lt;br&gt;
Git will be able to help me track changes i make in my process of coming up with the project. It will clearly show me what i did and at what particular stage of my processes. This will be able to help me correct or make better the various version i have in my project. It keeps a history of all the changes i will have made in the project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Understanding Github
&lt;/h3&gt;

&lt;p&gt;Just as the name suggest, Git and Github seems to be relates but they entirely do different functions in my project. Github is an online platform that allows one to store projects and share the same online. It allows one to have a public option and a private option when it comes to storing and sharing your project. &lt;br&gt;
For example; when I am working on my project in my computer, I will be able to push it to my Github account and from there, I can be able to work on it and also share with others.&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Creating a Local Folder
&lt;/h4&gt;

&lt;p&gt;Here I will clearly explain the tools I will employ to create and access my local project folder. &lt;br&gt;
Below are some important codes I will use to create and access folders;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;mkdir&lt;/code&gt; This will make directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cd&lt;/code&gt; This means change directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cd ..&lt;/code&gt; This takes you back to previous directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ls&lt;/code&gt; This lists down whats in the directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rm&lt;/code&gt; This deletes document in the directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rm -r&lt;/code&gt; This deletes the folder in the directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;touch&lt;/code&gt; This creates a document&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In my computer, i will create a local folder using the command &lt;code&gt;mkdir my-first-github-project&lt;/code&gt;&lt;br&gt;
NB: We are using  hyphen when naming our folder to avoid spaces in between names and make the item easier to read and also follows common project naming convention. Though even without the hyphens the folder will still work.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Creating Folder and a README Document in my Local Folder
&lt;/h4&gt;

&lt;p&gt;The next step is to create a folder with the title date and also create a &lt;strong&gt;README&lt;/strong&gt; document.&lt;br&gt;
Why is it important to create a data file seperately from a &lt;strong&gt;README&lt;/strong&gt; document?&lt;br&gt;
It makes your project organized. Instead of puting everything in one folder, its important to seperate things according to their purpose.&lt;br&gt;
The Data file is used to store the actual data files while &lt;strong&gt;README&lt;/strong&gt; document is a well detailed explanation and manual instruction of your project.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You will use the command &lt;code&gt;mkdir data&lt;/code&gt; to create a new folder called data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use command &lt;code&gt;ls&lt;/code&gt; to list whats is inside my-first-github-project. &lt;br&gt;
Since you have created a folder by the name &lt;strong&gt;data&lt;/strong&gt;, you will only see the folder when you list.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use the command &lt;code&gt;touch README.md&lt;/code&gt; to create a &lt;strong&gt;REAMDE&lt;/strong&gt; document. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then use command &lt;code&gt;ls&lt;/code&gt; to list whats inside my-first-github-project folder. Now you will be able to see that you have the folder by the name &lt;strong&gt;data&lt;/strong&gt; and a &lt;strong&gt;README&lt;/strong&gt; document.&lt;br&gt;
NB. Its important to name your &lt;strong&gt;README.md&lt;/strong&gt; document with capital letters. This is a widely acceptable and conventional way of naming a &lt;strong&gt;README&lt;/strong&gt; file. It makes the file easily recognizable and Github recognizes it automatically.&lt;br&gt;
The extension &lt;strong&gt;md&lt;/strong&gt; in your &lt;strong&gt;REAMDE.md&lt;/strong&gt; file means that it uses Markdown language.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  3. Adding content in your &lt;strong&gt;README.md&lt;/strong&gt; file
&lt;/h4&gt;

&lt;p&gt;Its important to clearly explain or give instruction for your project. This will be clearly documented in your &lt;strong&gt;README.md&lt;/strong&gt; file.&lt;br&gt;
This can be done using VS Code or Terminal/Gitbash.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Using bash or terminal, access the folder &lt;code&gt;cd My-first-github-project&lt;/code&gt;
To write content in your README.md file, we shall use the command &lt;code&gt;echo "My-first-Github-Project" &amp;gt;README.md&lt;/code&gt;
To check what you wrote, use the command &lt;code&gt;cat README.md&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We can also use &lt;strong&gt;Nano&lt;/strong&gt; to simplify our writing task. We shall run the command &lt;code&gt;nano README.md&lt;/code&gt;. A text editor will appear wherein we shall type our content.&lt;br&gt;
To Save our content, we shall press &lt;strong&gt;Control + O&lt;/strong&gt; to save, Press &lt;strong&gt;Enter&lt;/strong&gt; Key to confirm the file, then press &lt;strong&gt;Control + X&lt;/strong&gt; to exit.&lt;br&gt;
NB: To check what you have written, use the command &lt;code&gt;cat README.md&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  4. Create a Git Repository
&lt;/h4&gt;

&lt;p&gt;We need to convert the ordinary file we are working in to a Git Project. We shall use the coomand &lt;code&gt;git init&lt;/code&gt;. This creates a hidden &lt;strong&gt;.Git&lt;/strong&gt; directory which contains information that our Git uses to track the developments.&lt;br&gt;
After running &lt;code&gt;git init&lt;/code&gt; command, our folder becomes a Git Repository.&lt;/p&gt;

&lt;h4&gt;
  
  
  5. Copying the Document With the Data to our &lt;strong&gt;Data folder&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Since we need to work on some data, we shall transfer the data to our &lt;strong&gt;Data Folder&lt;/strong&gt;.&lt;br&gt;
Assume we have downloaded an excel from internet and thus is lying in our local machine download folder, I shall copy the document from the Downloads file and copy to my data file.&lt;br&gt;
Alternatively, I can use the following command to copy the document to my data folder.&lt;br&gt;
&lt;code&gt;cp ~/Downloads/Kenyan-Health-Records-Analysis-File.xlx data/&lt;/code&gt;. Assume that the file was an excel file having the name Kenyan-Health-Records-Analysis.&lt;/p&gt;

&lt;h4&gt;
  
  
  6. Check the Status of the File
&lt;/h4&gt;

&lt;p&gt;It is important to check the status of the file. You will run &lt;code&gt;Git status&lt;/code&gt; to check the status of the file. &lt;br&gt;
You will be able to see that Git has found the project file but is not tracking them.&lt;/p&gt;

&lt;h4&gt;
  
  
  7. Allow Git to Track the File
&lt;/h4&gt;

&lt;p&gt;The next action is to let Git to track the file. This is possible by running the command &lt;code&gt;Git add .&lt;/code&gt;&lt;br&gt;
This means that Git will start tracking everything in the folder.&lt;/p&gt;

&lt;h4&gt;
  
  
  8. Commit Your Work
&lt;/h4&gt;

&lt;p&gt;This creates a saved version of your project. Its a very important step of the project as it saves the version of the project and can allow one to track changes made in the project.&lt;br&gt;
The command used to commit your work is &lt;code&gt;git commit -m "Version 1 Add Kenyan Health records"&lt;/code&gt;&lt;br&gt;
NB The wordings &lt;em&gt;&lt;strong&gt;Version 1 Add Kenyan Health Records&lt;/strong&gt;&lt;/em&gt; is tailored to your own understanding to help you know what exactly u saved at that particular stage. You can message anything provided it will help you understand what you did at that particular stage.&lt;/p&gt;

&lt;h4&gt;
  
  
  9. Connecting to Github
&lt;/h4&gt;

&lt;p&gt;Now that we have saved our project, we now connect to Github. &lt;br&gt;
Its important to run comman &lt;code&gt;Git status&lt;/code&gt; to confirm everything is clean. You will get a message &lt;strong&gt;&lt;em&gt;nothing to commit, working tree clean&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
After confirming everything is okay&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Log in to Your Github Account&lt;/li&gt;
&lt;li&gt;Create a repository&lt;/li&gt;
&lt;li&gt;Give the repository a name&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  10. Creating an SSH key
&lt;/h4&gt;

&lt;p&gt;An SSH key is important as it gives your computer as safer way to connect to your Github account without the need to inputting password everytime when you need to work on your project.&lt;br&gt;
I can check in my computer whether there it has an existing SSH Key. I will use the following command to check &lt;code&gt;ls -al ~/.ssh&lt;/code&gt;. If you see in your computer file such as &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;id_ed25519&lt;/li&gt;
&lt;li&gt;id_ed25519.pub
It means your computer already has a key. 
But in cases where you dont have a key, You will be required to create one. I will describe in details what is required when generating an SSH Key.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Generating an SSH Key
Open your Git bash/terminal and key in the following command &lt;code&gt;ssh-keygen -t ed25519 -C "your-email@example.com"&lt;/code&gt;
Put your email and replace with the wordings &lt;a href="mailto:your-email@example.com"&gt;your-email@example.com&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;Enter the File in which you want to save the key&lt;/li&gt;
&lt;li&gt;Copy your public Key&lt;/li&gt;
&lt;li&gt;Add the public key in Github&lt;/li&gt;
&lt;li&gt;Under Key, paste the Public key you just created&lt;/li&gt;
&lt;li&gt;Add the SSH Key&lt;/li&gt;
&lt;li&gt;Test the connection&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  11. Connecting Your Local Project to Github
&lt;/h4&gt;

&lt;p&gt;After successfully creating my Github repository and setting up SSH key, I will now tey connect my local Project to Github.&lt;br&gt;
I will run the following command &lt;code&gt;git remote add origin git@github.com:YOUR-USERNAME/kenya-hospital-records-analysis.git&lt;/code&gt;&lt;br&gt;
NB: Replace your **YOUR-USERNAME with your user name appearing in Github.&lt;br&gt;
Use the command 'git remote -v' to check the connection.&lt;/p&gt;

&lt;p&gt;Once you confirm the connection was successful, I will now push my project to Github. &lt;br&gt;
Use the command &lt;code&gt;git push -u origin main&lt;/code&gt;. &lt;br&gt;
Afterwards, refresh the page in github and you will be able to see your project.&lt;/p&gt;

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

&lt;p&gt;The entire process has helped me understand the tools used and commands to adopt in order to push my project from a local folder to Github using SSH. The process might be lengthy at first but when you clearly understand the reason and importance of the codes being used, the process becomes clear well organized. There are sections your Gitbash/Terminal will give you errors and when you successfully correct the errors, you learn why the system behaved in such a manner and it becomes an additional learning point.&lt;/p&gt;

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