<?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: Brian Kariuki</title>
    <description>The latest articles on DEV Community by Brian Kariuki (@brian_kariuki).</description>
    <link>https://dev.to/brian_kariuki</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%2F4070915%2F1a55be41-4342-452f-8829-5d70548f28d9.png</url>
      <title>DEV Community: Brian Kariuki</title>
      <link>https://dev.to/brian_kariuki</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/brian_kariuki"/>
    <language>en</language>
    <item>
      <title>My First Github Project: From A Local Folder To Github Using Git And SSH.</title>
      <dc:creator>Brian Kariuki</dc:creator>
      <pubDate>Sat, 22 Aug 2026 11:29:21 +0000</pubDate>
      <link>https://dev.to/brian_kariuki/my-first-github-project-from-a-local-folder-to-github-using-git-and-ssh-l00</link>
      <guid>https://dev.to/brian_kariuki/my-first-github-project-from-a-local-folder-to-github-using-git-and-ssh-l00</guid>
      <description>&lt;h1&gt;
  
  
  Git and Github
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Github&lt;/strong&gt; is a website and cloud-based platform where users may store, exchange, and collaborate on computer code. It makes use of &lt;strong&gt;Git&lt;/strong&gt;, a program that keeps track of file changes over time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating Project Folder
&lt;/h2&gt;

&lt;p&gt;I first created a new project using &lt;strong&gt;Gitbash&lt;/strong&gt; called Kenya-Health-Records-Analysis using the &lt;strong&gt;mkdir&lt;/strong&gt; &lt;em&gt;make directory&lt;/em&gt; command.&lt;/p&gt;

&lt;h3&gt;
  
  
  Steps I took:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Navigated where I want project stored (&lt;code&gt;cd ~/Desktop&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Created the project folder (&lt;code&gt;mkdir Kenya-Health-Records-Analysis&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Enter the created folder (&lt;code&gt;cd Kenya-Health-Records-Analysis&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Inside the Kenya-Health-Records-Analysis folder, I created an additional folder called data (&lt;code&gt;mkdir data&lt;/code&gt;) and a file README.md (&lt;code&gt;touch README.md&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;Inside the data folder I added a Kenya_Hospital_Health_Records xlsx file.&lt;/p&gt;

&lt;h2&gt;
  
  
  User Guide To Our First Project
&lt;/h2&gt;

&lt;p&gt;Our README.md file serves as introduction or user guide to our project. I opened and edited it in &lt;strong&gt;gitbash&lt;/strong&gt; by running &lt;code&gt;nano README.md&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Steps I took
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Navigated to the Project Folder &lt;code&gt;cd Kenya-Health-Records-Analysis&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Typed open command &lt;code&gt;nano README.md&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Edited text insided the terminal window explaining our project.&lt;/li&gt;
&lt;li&gt;Saved changes &lt;strong&gt;ctrl+o&lt;/strong&gt; then Enter&lt;/li&gt;
&lt;li&gt;Exit nano &lt;strong&gt;ctrl+x&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Creating our Github Account
&lt;/h2&gt;

&lt;p&gt;As stated earlier, &lt;strong&gt;Github&lt;/strong&gt; is a cloud-based platform where users may store, exchange, and collaborate on computer code. It makes use of &lt;strong&gt;Git&lt;/strong&gt;, a program that keeps track of file modifications over time to prevent you from losing previous work or becoming confused by different stored versions. I used my email to create Github, set a good password, chose the Github free tier and customized my profile.&lt;/p&gt;

&lt;h2&gt;
  
  
  Set Up SSH for GitHub
&lt;/h2&gt;

&lt;p&gt;SSH enables secure communication between my computer and Github without requiring me to input my Github username and password each time I push changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Steps I took
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Checked whether I already have an SSH key by running &lt;code&gt;ls -al ~/.ssh&lt;/code&gt;, In my case I didn't have one.&lt;/li&gt;
&lt;li&gt;I created a new SSH key by running &lt;code&gt;ssh-keygen -t ed25519 -C "your-email@example.com"&lt;/code&gt; , replaced email with the email address connected to my GitHub account.&lt;/li&gt;
&lt;li&gt;Created an SSH passphrase.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Add SSH Key to the SSH Agent
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Started the SSH agent by running &lt;code&gt;eval "$(ssh-agent -s)"&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Then added my private SSH key &lt;code&gt;ssh-add ~/.ssh/id_ed25519&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Add Public SSH Key to GitHub
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Show my public SSH key by running &lt;code&gt;cat ~/.ssh/id_ed25519.pub&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Copy the Public SSH Key.&lt;/li&gt;
&lt;li&gt;Open GitHub and go to Settings, then select &lt;strong&gt;SSH and GPG keys&lt;/strong&gt;. &lt;/li&gt;
&lt;li&gt;Click New SSH key, enter a descriptive title such as &lt;em&gt;My laptop&lt;/em&gt;, and paste the public SSH key into the key field.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Test SSH Connection
&lt;/h3&gt;

&lt;p&gt;Tested whether GitHub recognizes my &lt;strong&gt;SSH&lt;/strong&gt; key by running, &lt;code&gt;ssh -T git@github.com&lt;/code&gt;. My case I was asked to confirm GitHub's host by typing yes. GitHub displayed a successful authentication message.&lt;/p&gt;

&lt;h2&gt;
  
  
  Open Project Folder
&lt;/h2&gt;

&lt;p&gt;I navigated to the folder containing my project, &lt;code&gt;cd Kenya-Health-Records-Analysis&lt;/code&gt;&lt;br&gt;
I confirmed that I'm in the correct folder by listing its contents, &lt;code&gt;ls&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Initialize Git in Local Project
&lt;/h2&gt;

&lt;p&gt;Inside my project folder, I &lt;strong&gt;initialized&lt;/strong&gt; Git by running, &lt;code&gt;git init&lt;/code&gt;, this command creates a new local Git repository and allows Git to begin tracking changes to your project files. &lt;br&gt;
Checked the repository status by running, &lt;code&gt;git status&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Add Project Files to Git
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Added&lt;/strong&gt; all files in the current project folder to Git by running, &lt;code&gt;git add .&lt;/code&gt;&lt;br&gt;
Checked whether the files are ready to be committed by running &lt;code&gt;git status&lt;/code&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Create First Commit
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Commit&lt;/strong&gt; main goal is to permanently store your project in your local repository history, I run &lt;code&gt;git commit -m "Initial commit"&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create a New Repository on GitHub
&lt;/h2&gt;

&lt;p&gt;Inside Github, I selected New &lt;strong&gt;repository&lt;/strong&gt;,entered a name for my project, chose whether the &lt;strong&gt;repository&lt;/strong&gt; should be Public or Private and clicked Create &lt;strong&gt;repository&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connect Local Project to GitHub
&lt;/h2&gt;

&lt;p&gt;In GitHub repository created, I clicked SSH and copied the URL.&lt;br&gt;
I connected local repository to gitHub by running, &lt;code&gt;git remote add origin git@github.com:YOUR-USERNAME/Kenya-Health-Records-Analysis&lt;/code&gt;, replaced USERNAME with my actual github username.&lt;br&gt;
I verified that the remote repository was added successfully by running, &lt;code&gt;git remote -v&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Push Project to GitHub
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Pushed&lt;/strong&gt; my project to GitHub by running, &lt;code&gt;git push -u origin main&lt;/code&gt;&lt;br&gt;
Project files were visible in my GitHub repository.&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
      <category>datascience</category>
      <category>analytics</category>
    </item>
  </channel>
</rss>
