<?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: Makori Nyachaki</title>
    <description>The latest articles on DEV Community by Makori Nyachaki (@makorinyachaki).</description>
    <link>https://dev.to/makorinyachaki</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%2F930536%2F9502c910-1809-4df6-9150-73fd2ff4250c.jpg</url>
      <title>DEV Community: Makori Nyachaki</title>
      <link>https://dev.to/makorinyachaki</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/makorinyachaki"/>
    <language>en</language>
    <item>
      <title>My First Project: From a Local Folder to GitHub Using Git and SSH</title>
      <dc:creator>Makori Nyachaki</dc:creator>
      <pubDate>Sun, 23 Aug 2026 05:34:57 +0000</pubDate>
      <link>https://dev.to/makorinyachaki/my-first-project-from-a-local-folder-to-github-using-git-and-ssh-9eb</link>
      <guid>https://dev.to/makorinyachaki/my-first-project-from-a-local-folder-to-github-using-git-and-ssh-9eb</guid>
      <description>&lt;h1&gt;
  
  
  My First Project: From a Local Folder to Git hub Using Git and SSH
&lt;/h1&gt;

&lt;h2&gt;
  
  
  GIT
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;Git is an open source version control system used to manage projects. It is fast and efficient to manage projects using git. You can easily track the project version, history, modifications, and many more project activities. It allows for ease of collaboration while working on projects as teams.&lt;/p&gt;

&lt;h3&gt;
  
  
  Installing Git
&lt;/h3&gt;

&lt;p&gt;Download and install git from &lt;a href="https://git-scm.com/install/windows" rel="noopener noreferrer"&gt;Git&lt;/a&gt;. Ensure you download for your respective operating system.&lt;/p&gt;

&lt;h3&gt;
  
  
  Configuring Git
&lt;/h3&gt;

&lt;p&gt;Before using Git effectively, you have to configure your identity by setting up your &lt;em&gt;username&lt;/em&gt; and &lt;em&gt;email&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;This allows to easily track any changes to your project and the associate that is who made the changes.&lt;/p&gt;

&lt;p&gt;To set up your identity, follow the following steps, using Git Bash a git terminal:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Steps&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;To set your username&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git config --global user.name "YOUR NAME"&lt;/code&gt;&lt;/p&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%2Fm2klshvu1cg81rnk5b9h.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%2Fm2klshvu1cg81rnk5b9h.png" alt=" " width="490" height="33"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In place of &lt;em&gt;YOUR NAME&lt;/em&gt; type in your correct user name that will be associated with your github account activity.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;To set your email&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git config --global user.email "youemail@example.com"&lt;/code&gt;&lt;/p&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%2Fsgftb5445ya6u0h7se9d.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%2Fsgftb5445ya6u0h7se9d.png" alt=" " width="532" height="37"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt; It is recommended to use your correct email that is associated with your GitHub account.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Rename you GitHub branch to &lt;em&gt;main&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git config --global init.Branch main&lt;/code&gt;&lt;/p&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%2Fq4b2fl8gsgnl5wp1ua9m.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%2Fq4b2fl8gsgnl5wp1ua9m.png" alt=" " width="486" height="31"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After setting up your identity you can verify your configurations to confirm your identity for each field set.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To check your:&lt;/p&gt;

&lt;p&gt;User name&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`git config --global user.name`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Email&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`git config --global user.email`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Branch&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --global init.Branch`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;OR&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can use the following command to check all you account details instead:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`git config --global --lists`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2F1cgsansyzn2xjgc4yqqa.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%2F1cgsansyzn2xjgc4yqqa.png" alt=" " width="648" height="196"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  SSH
&lt;/h2&gt;

&lt;p&gt;SSH key is a secure credential used to authentication to accessing network resources confidentially without need of a password. The ssh-key contains two keys. A &lt;em&gt;&lt;strong&gt;Public&lt;/strong&gt;&lt;/em&gt; and &lt;em&gt;&lt;strong&gt;Private&lt;/strong&gt;&lt;/em&gt; key. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Public key&lt;/strong&gt; is used publicly, that is it is shared between peers. Used to identify you remote resources.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Private key&lt;/strong&gt; it is a pair key that is kept as a secret for identifying your local machine.&lt;/p&gt;

&lt;h3&gt;
  
  
  Generating an SSH Key
&lt;/h3&gt;

&lt;p&gt;Using Git Bash&lt;/p&gt;

&lt;p&gt;Before generating a new SSH Key, it is recommended to check and confirm if you have an existing key which you can use.&lt;/p&gt;

&lt;p&gt;To check if you have an existing key use the following command:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`ls -al ~/.ssh`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The command will list all existing ssh keys. Here sample output:&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%2Ffp2p0ax8ew91mgfn9w4s.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%2Ffp2p0ax8ew91mgfn9w4s.png" alt=" " width="798" height="166"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If there is no existing key, you can generate a new key that you will use to link your computer with your github account.&lt;/p&gt;

&lt;p&gt;To generate a new ssh key, follow the following steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Genereate a new ssh-key&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ssh-keygen -t ed25529 -C "youremail@example.com"&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The email should be the one associated with with your github account.&lt;/p&gt;

&lt;p&gt;Follow the prompt by adding the name of your key, and also you can add the passphrase which is optional.&lt;/p&gt;

&lt;p&gt;The passhrase should be memorable, you will need to use it each time you want to access you github account.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Add your key to the SSH-Agent.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Open your Powershell Terminal and follow the steps below:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- Run the following command to start your SSH Agent

    `Get-Service -Name ssh-agent | Set-Service StartupType Manual`

- Add your key to the  path using the  command

    `ssh-add &amp;lt;PATH/TO/YOUR/PRIVATE_KEY&amp;gt;`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;After the command, you should specifify the path to your private key and add it to your host machine's ssh-agent. i.e. &lt;code&gt;ssh-add "C:/Users/&amp;lt;YOUR_USER_NAME/.ssh/&amp;lt;YOUR_PRIVATE_KEY&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you don't know your computer's user name, you can use the &lt;code&gt;whoami&lt;/code&gt; command to see your username.&lt;/p&gt;

&lt;p&gt;Your &lt;em&gt;PRIVATE_KEY_NAME&lt;/em&gt; is the name that you gave to your key.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- Once you're done, close your Powershell terminal and return to Git Bash.

- Type the following command

    `git config --global core.sshCommand "C:/Windows/System32/OpenSSH/ssh.exe`

- Then Clip and copy your key using the following commands:

    `clip &amp;lt; ~/.ssh/&amp;lt;PUBLIC_KEY.pub&amp;gt;`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;i.e &lt;code&gt;clip &amp;lt; /.ssh/my_key.pub&lt;/code&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    `cat ~/.ssh/&amp;lt;PUBLIC_KEY.pub&amp;gt;`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;i.e. 'cat ~/.ssh/my_key.pub` to view your public ssh key&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- After displaying your key, select and copy the key to add to your GitHub account.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Adding Your Key to GitHub
&lt;/h3&gt;

&lt;p&gt;To connect your computer and git-hub is necessary to facilitate access to your remote resources from your local computer.&lt;/p&gt;

&lt;p&gt;You need to add your SSH Keys to GitHub to facilitate the connection. To achieve this, follow the steps:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you have an existing GitHub account:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;a. Login to your account using your email/username and password.&lt;/p&gt;

&lt;p&gt;b. From the profile section, go to &lt;em&gt;Settings&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;c. Scroll to &lt;em&gt;SSH and GPG Key&lt;/em&gt;. Navigate and click on &lt;em&gt;New SSH Key&lt;/em&gt; on the SSH Key Section to your right.&lt;/p&gt;

&lt;p&gt;e. Add the &lt;em&gt;Title/Name&lt;/em&gt; of the key i.e. &lt;em&gt;Ubuntu Laptop&lt;/em&gt;, the key will be used for &lt;em&gt;Authentication&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;f. Paste your key to the available textbox.&lt;/p&gt;

&lt;p&gt;g. Finally, click on &lt;em&gt;Add Key&lt;/em&gt; to save your key. You'll be prompted to re-enter your git-hub account password (login password), to confirm your authenticity before saving.&lt;/p&gt;

&lt;p&gt;Now you are ready to go. Before you start, it is good you test your connection to check if it was successful.&lt;/p&gt;

&lt;p&gt;Run Powershell as an Administrator and use the following command to test connection:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`ssh -T git@github.com`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If the connection is successful, your username will be displayed along with a success message.&lt;/p&gt;

&lt;p&gt;If successful, you are good to go and work on your project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Working With Folders
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;To keep you project structural and more organized; you've to keep its files and scripts in folders.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This will make it easier to navigate and access the project. Follow the steps below to work with folders in Windows.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In Git Bash Terminal(Opened normally)&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;To navigate and change location use the following command&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`cd &amp;lt;path_location&amp;gt;`
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To select the current location&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    `cd .`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;To get to the previous location one step back use&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    `cd ..`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Getting back to the root directory use&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    `cd ~`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;You can also move to a specific folder by specifying the path to that folder&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    `cd &amp;lt;path/to/folder&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;example: &lt;code&gt;cd "C:/Users/Admin/Desktop/My-Project"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;My-Project/&lt;/em&gt; is a folder located in Desktop, which is for the user with the username &lt;em&gt;Admin&lt;/em&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;To create a directory or folder use&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`mkdir &amp;lt;directory_name&amp;gt;`
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;i.e. Create a directory named &lt;em&gt;My-First-Project&lt;/em&gt; in Desktop &lt;code&gt;mkdir My-First-Project&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Navigate to your created folder. Assuming you are on Desktop, use the following command:&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`cd My-First-Project/`
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So your bash terminal path will look like &lt;code&gt;~/Desktop/My-First-Project&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;To list and view items use the following command&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`ls`
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It will list all files and folders excluding the hidden files and folders. As shown below:&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%2Fv8l5ka6phzhoqyibjcse.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%2Fv8l5ka6phzhoqyibjcse.png" alt=" " width="800" height="125"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To list and view all files and folders including the hidden ones you add &lt;em&gt;-a&lt;/em&gt; attribute to the &lt;code&gt;ls&lt;/code&gt; command as below&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    `ls -a`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2F2wt7jom89ta8ny7tosie.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%2F2wt7jom89ta8ny7tosie.png" alt=" " width="800" height="128"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To list files and display their attributes we add the &lt;em&gt;-l&lt;/em&gt; attribute to the &lt;code&gt;ls&lt;/code&gt; command.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    `ls -l`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fdmop7m63pzur63y7o0ic.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%2Fdmop7m63pzur63y7o0ic.png" alt=" " width="798" height="210"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt; You can combine the attributes to list all files and their attributes i.e. as &lt;code&gt;ls -al&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;You can delete an empty folder using &lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`rm -r &amp;lt;folder_name&amp;gt;`
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To delete a folder together with its contents we use the &lt;code&gt;rm -r &amp;lt;non-empty_folder_name&amp;gt;&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;Example: Create a folder in you my project folder using the &lt;code&gt;mkdir&lt;/code&gt; command, inspect the folder created and its contents, then delete the folder using the rm command:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Steps&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Create scripts: &lt;code&gt;mkdir scripts&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Navigate to scripts and back to your project folder: &lt;code&gt;cd scripts/&lt;/code&gt; and &lt;code&gt;cd ..&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Inspect scripts: &lt;code&gt;ls scripts/&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Delete scripts: &lt;code&gt;rm -r scripts/&lt;/code&gt;&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%2F4q6swbhytblh9sv2f3ao.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%2F4q6swbhytblh9sv2f3ao.png" alt=" " width="799" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt; &lt;code&gt;rm&lt;/code&gt; without any attribute will no delete a directory/folder even if empty, the attribute &lt;em&gt;-r&lt;/em&gt; tells the command &lt;code&gt;rm&lt;/code&gt; that what you're deleting is a directory.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You can copy and paste contents between different folders.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To copy contents moves a duplicate of the files to another location leaving the original intact.&lt;/p&gt;

&lt;p&gt;While using the &lt;code&gt;cp&lt;/code&gt; command you have to specify the file/contents path and the destination address. Example:&lt;/p&gt;

&lt;p&gt;To copy some file named hello.txt to the scripts folder; you need to recreate the folder and create the file in the root directory then copy it to scripts folder in your projects folder&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Steps&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In your project folder create scripts &lt;code&gt;mkdir scripts&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Navigate to your project root folder and create the file &lt;em&gt;hello.txt&lt;/em&gt; &lt;code&gt;touch hello.txt&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy the file to scripts &lt;code&gt;cp hello.txt ~/scripts&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Inspect both locations to see that the file exists in both location. &lt;code&gt;ls&lt;/code&gt; and &lt;code&gt;ls scripts&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt; You can specify the file path in the cp command if the file is in a different location and the destination path address &lt;/p&gt;

&lt;p&gt;i.e. &lt;code&gt;cp &amp;lt;~/path/to/file_to_be_copied.txt&amp;gt; &amp;lt;~/path/to_destination/&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You can move a file or any content completely from the source to an new destination using the &lt;code&gt;mv&lt;/code&gt; command.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Example: Move &lt;em&gt;hello.txt&lt;/em&gt; file from the project's folder to a new folder named &lt;em&gt;docs&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`mv hello.txt docs/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt; You can also specify the file path in case the files and destination address are in different locations i.e. &lt;code&gt;mv &amp;lt;~/path/from_source/hello.txt&amp;gt; &amp;lt;~/path/to_destination_folder/&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Working With Files
&lt;/h2&gt;

&lt;p&gt;While working in your project you will need to create different files for your project.&lt;/p&gt;

&lt;p&gt;The different files will be saved in different directories depending on their type and use. &lt;/p&gt;

&lt;p&gt;The organization will help us to achieve a proper project structure, easier to navigate and access our project files.&lt;/p&gt;

&lt;p&gt;We will create our files using Git Bash terminal.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To create a file we'll use the &lt;code&gt;touch&lt;/code&gt; command. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Create a file named &lt;em&gt;hello-world.txt&lt;/em&gt; in your project root directory.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    `touch hello-world.txt`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Use the &lt;code&gt;ls&lt;/code&gt; command to confirm your file has been created.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To view the contents of the file we use the &lt;code&gt;cat&lt;/code&gt; command, since our file is empty it will display 'nothing'.&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`cat hello-world.txt`
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To add contents to our file we use the &lt;code&gt;echo&lt;/code&gt; command.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Add the following text to the file &lt;em&gt;hello-world.txt&lt;/em&gt;; "Hello, World"&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    `echo "Hello, World!" &amp;gt; hello-world.txt`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Ffccmiel0gdoohobtiwby.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%2Ffccmiel0gdoohobtiwby.png" alt=" " width="483" height="27"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We use the &lt;em&gt;&amp;gt;&lt;/em&gt; to redirect the output to our file. &lt;em&gt;&amp;gt;&lt;/em&gt; Rewrites any content in the file. &lt;/p&gt;

&lt;p&gt;If you want to add more content to the file use &lt;em&gt;&amp;gt;&amp;gt;&lt;/em&gt;, more text will be added to our file. &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%2Fwdfqh2byidzkfb9f0zkl.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%2Fwdfqh2byidzkfb9f0zkl.png" alt=" " width="675" height="43"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Example; add the following text to our file "I am happy to learn SSH and Git".&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    `echo "I am happy to learn Git and SSH" &amp;gt;&amp;gt; hello-world.txt`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cat hello-world.txt&lt;/code&gt; to view the contents of the file.&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%2Fej57klmspja8riwtn850.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%2Fej57klmspja8riwtn850.png" alt=" " width="439" height="82"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;* Editing you file using nano *&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Nano is an inbuilt text editor in Git Bash.&lt;/p&gt;

&lt;p&gt;It helps us to navigate through our files; scripts, text file, .... once we make mistakes.&lt;/p&gt;

&lt;p&gt;To open our script or text file we use the &lt;code&gt;nano&lt;/code&gt; command in git bash then specify the file we want to open, for example open &lt;em&gt;hello-world.txt&lt;/em&gt; using nano:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    `nano hello-world.txt'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2F57izzxrx1dx3aw0z2zhj.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%2F57izzxrx1dx3aw0z2zhj.png" alt=" " width="693" height="265"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are many more commands for nano that will help you edit your text file. For example the most common commands are:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Ctr + O - To save your file

2. Ctrl + X - To exit your nano text editor

3. Ctrl + K - To Cut text in the editor

4. Ctrl + U - To Paste your text

5. Ctrl + G - To find help for you nano editor.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;There are many more commands of help that you can use to edit you files in nano editor.&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%2Fqlt2qdhhgchhi27je0fg.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%2Fqlt2qdhhgchhi27je0fg.png" alt=" " width="800" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Your First Project
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Initialize your first project with git
&lt;/h3&gt;

&lt;p&gt;Before running the command, check to confirm that you are in your project folder using the &lt;code&gt;pwd&lt;/code&gt; command. &lt;/p&gt;

&lt;p&gt;The &lt;code&gt;pwd&lt;/code&gt; command means &lt;em&gt;print working directory&lt;/em&gt;  it shows your current location with regard to the root directory.&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%2Fpcuz99l2l79zybxvl6oh.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%2Fpcuz99l2l79zybxvl6oh.png" alt=" " width="595" height="57"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If in your project directory, the path will end with the name of the project folder. I.e. &lt;em&gt;My-First-Project&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Use the &lt;code&gt;git init&lt;/code&gt; command.&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%2F247lvpe6jyclmjvnr0mf.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%2F247lvpe6jyclmjvnr0mf.png" alt=" " width="800" height="44"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The command is used to initialize our project directory as a git repository.&lt;/p&gt;

&lt;h3&gt;
  
  
  Git repository structure.
&lt;/h3&gt;

&lt;p&gt;After running the above command, you may notice notification  of git initializing an empty git repo...&lt;/p&gt;

&lt;p&gt;If you list to view the structure using the &lt;code&gt;ls&lt;/code&gt; command you may notice a &lt;em&gt;.git/&lt;/em&gt; folder.&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%2Fbbr03ybcaz3k1k981pqf.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%2Fbbr03ybcaz3k1k981pqf.png" alt=" " width="604" height="70"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The folder contains Git's internal repository information, which git uses to manage activities such as: push, commits, pull, Branches, project history, repository configurations,....&lt;/p&gt;

&lt;h3&gt;
  
  
  Checking the project status
&lt;/h3&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    `git status`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Used to show what's happening with your project currently. &lt;/p&gt;

&lt;p&gt;It can show things such as untracked files, staged files to be committed yet, if the working tree is clean meaning everything has been committed.&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%2Fxfxrbvxtrpkzz7s5lbjp.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%2Fxfxrbvxtrpkzz7s5lbjp.png" alt=" " width="799" height="220"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The above show that there is nothing that has been staged for commit, there are three untracked files in the initialized repository.&lt;/p&gt;

&lt;h3&gt;
  
  
  Staging your project files
&lt;/h3&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    `git add .`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fh4kecaxriw57axl4zqj5.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%2Fh4kecaxriw57axl4zqj5.png" alt=" " width="800" height="48"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It adds your project files to git for tracking.&lt;/p&gt;

&lt;p&gt;Checking on the status of the staged file, you should get such an output with &lt;code&gt;git status&lt;/code&gt; command&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%2Fyyw2v2g37wg58rxm0x4o.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%2Fyyw2v2g37wg58rxm0x4o.png" alt=" " width="800" height="613"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It prepares all you changes for the next commit.&lt;/p&gt;

&lt;p&gt;You can stage a single file by specifying the file/folder you want to stage i.e. &lt;code&gt;git add &amp;lt;file_name.txt&amp;gt;&lt;/code&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%2Fy46q03xne97cxa93a32i.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%2Fy46q03xne97cxa93a32i.png" alt=" " width="800" height="34"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You should see almost a similar output when using &lt;code&gt;git status&lt;/code&gt; command after staging a single file&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%2F8wp949u9pgcm45u3qef8.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%2F8wp949u9pgcm45u3qef8.png" alt=" " width="759" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using the &lt;em&gt;.&lt;/em&gt; means you stage everything in your project folder.&lt;/p&gt;

&lt;h3&gt;
  
  
  Commiting you staged files
&lt;/h3&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    `git commit -m "&amp;lt;commit message&amp;gt;"`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Creates a saved checkpoint.&lt;/p&gt;

&lt;p&gt;The message should be precise and clear, related to the activity carried out. i.e. "My First Project Using Git Commit"&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%2F2rm4jyeyxa0vbztp66x9.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%2F2rm4jyeyxa0vbztp66x9.png" alt=" " width="800" height="582"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It does not upload anything to git-hub yet.&lt;/p&gt;

&lt;h3&gt;
  
  
  Uploading to git-hub
&lt;/h3&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    `git push -u origin &amp;lt;branch_name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fdk7kjy553cgykupctzn6.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%2Fdk7kjy553cgykupctzn6.png" alt=" " width="513" height="76"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sends all the committed changes to GitHub. However, in our case we get the above error because we have not linked our local project repo to a git-hub remote repository.&lt;/p&gt;

&lt;p&gt;We will be linking our repositories in the next section.&lt;/p&gt;

&lt;p&gt;After running this command, you can easily check on the changes whether they reflect on GitHub via your browser.&lt;/p&gt;

&lt;p&gt;However, for us we are yet to see these changes. This may not work since we are yet to create a remote repository which we will then connect to our local project in our laptop.&lt;/p&gt;

&lt;h3&gt;
  
  
  Creating a remote repository
&lt;/h3&gt;

&lt;p&gt;To create a remote repository, follow the following steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Login to your git-hub account&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In your account click on "Create New Repository"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enter the name of your Repository as "My-First-Project"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Do not create a README, uncheck the checkbox&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Provide a brief descriptions for your project. The description is: "My First Project: From a Local Folder to Git hub Using Git and SSH"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then click on Create Repository&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A new empty repository is created with the name "My-First-Project"&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%2Fh56tjssz20qekcpbtm93.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%2Fh56tjssz20qekcpbtm93.png" alt=" " width="800" height="758"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Navigate to your repository&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on the &lt;em&gt;code&lt;/em&gt; section, then click on &lt;em&gt;ssh&lt;/em&gt; tab and copy the &lt;em&gt;ssh code&lt;/em&gt;&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%2Fvxiq5azw5r8w30i4d1m5.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%2Fvxiq5azw5r8w30i4d1m5.png" alt=" " width="800" height="524"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We'll use the ssh code to connect our remote and local repositories before pushing our project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Connecting our local and remote repositories
&lt;/h3&gt;

&lt;p&gt;Navigate to your git initialized  project folder&lt;/p&gt;

&lt;p&gt;Type in the following command and thereafter paste the ssh code for your remote repository and hit enter.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    `git remote add origin &amp;lt;your_remote_ssh_code&amp;gt;`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;i.e. &lt;code&gt;git remote add origin git@github.com:MakoriNyachaki/My-First-Github-Project.git&lt;/code&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%2Fsy23kp10jw9rabxkx8ys.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%2Fsy23kp10jw9rabxkx8ys.png" alt=" " width="800" height="77"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rename your branch
&lt;/h3&gt;

&lt;p&gt;If your remote repository's branch is not &lt;em&gt;main&lt;/em&gt; rename it to &lt;em&gt;main&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    `git branch -m main`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2F7y5wp945ky3xes3mmybe.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%2F7y5wp945ky3xes3mmybe.png" alt=" " width="799" height="49"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Check the remote
&lt;/h3&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    `git remote -v`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fqx90sivwfrdpo5706rk9.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%2Fqx90sivwfrdpo5706rk9.png" alt=" " width="800" height="77"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Push your project to git-hub
&lt;/h3&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    `git push -u origin &amp;lt;branch_name&amp;gt;`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;i.e. &lt;code&gt;git push -u origin main&lt;/code&gt; this works to upload our committed changes to our git-hub repository.&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%2Ffmwjvyxy6adhsoh1qtvm.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%2Ffmwjvyxy6adhsoh1qtvm.png" alt=" " width="714" height="211"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;An introductory article for learning GIT and SSH. It is thrilling practical exercise for generating ssh keys, working with folders and files, connecting local project folders with remote repositories, and working with git. The introductory article requires one to do further research on so many commands that are available for the different tools we have used here in order to be an expert. Let's learn forward.&lt;/p&gt;

</description>
      <category>github</category>
      <category>ai</category>
      <category>programming</category>
      <category>database</category>
    </item>
  </channel>
</rss>
