<?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: Dorsila Otieno</title>
    <description>The latest articles on DEV Community by Dorsila Otieno (@dorsila_otieno_f355d37bd8).</description>
    <link>https://dev.to/dorsila_otieno_f355d37bd8</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%2F4071521%2F926326a0-7f44-4067-9899-e86063769f88.png</url>
      <title>DEV Community: Dorsila Otieno</title>
      <link>https://dev.to/dorsila_otieno_f355d37bd8</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dorsila_otieno_f355d37bd8"/>
    <language>en</language>
    <item>
      <title>Understanding Gitworkflow</title>
      <dc:creator>Dorsila Otieno</dc:creator>
      <pubDate>Sat, 22 Aug 2026 15:11:45 +0000</pubDate>
      <link>https://dev.to/dorsila_otieno_f355d37bd8/understanding-gitworkflow-5bo2</link>
      <guid>https://dev.to/dorsila_otieno_f355d37bd8/understanding-gitworkflow-5bo2</guid>
      <description>&lt;h1&gt;
  
  
  Git Workflow
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Git&lt;/strong&gt; is a local version control system that tracks code changes, while &lt;strong&gt;GitHub&lt;/strong&gt; is a cloud-based platform used to host those changes and collaborate with others. Together, they form the backbone of modern software development by allowing multiple developers to work on the same codebase simultaneously without overwriting each others work&lt;/p&gt;

&lt;h2&gt;
  
  
  Working directory of git
&lt;/h2&gt;

&lt;p&gt;This is the actual, physical folder on your computer's filesystem where you &lt;strong&gt;view, create, edit, and delete&lt;/strong&gt; your project files.&lt;br&gt;
It can either contain :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tracked files&lt;/strong&gt;:  files that Git actively monitors and includes in version control history&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Untracked files&lt;/strong&gt;:  are any files in your working directory that have not yet been added to your Git repository's snapshots or staging area.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Staging
&lt;/h2&gt;

&lt;p&gt;Staging is the process of preparing specific file changes to be included in your next commit.&lt;/p&gt;
&lt;h3&gt;
  
  
  Reasons for staging
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Atomic Commits&lt;/strong&gt;: It allows you to group related changes together. If you fix a bug and work on a new feature at the same time, you         can stage and commit the bug fix separately from the incomplete feature.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review Mechanism&lt;/strong&gt;: It provides a safe buffer zone to double-check exactly what lines of code are moving forward.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Work Checkpointing&lt;/strong&gt;: You can stage a file at a certain point of success, continue experimenting on that file in your working directory, and still preserve your staged checkpoint.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  Staging commands
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;git add "filename"&lt;/code&gt; Stages a specific file.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git init&lt;/code&gt; Manages project.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git status&lt;/code&gt; To see what files are currently sitting in staging vs your working directory.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git diff&lt;/code&gt; Shows differences between your working directory and your staging area.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git diff --staged&lt;/code&gt; Shows differences between your staging area and your last commit &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git restore --staged "filename"&lt;/code&gt; Removes Changes from Staging&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Commit and push
&lt;/h2&gt;

&lt;p&gt;To save your local changes and upload them to git you need to  stage your changes, commit them locally, and push them to the server.&lt;/p&gt;
&lt;h3&gt;
  
  
  Commands used in commit and push
&lt;/h3&gt;

&lt;p&gt;The block of code below is used in the given order to commit and push;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"commit message"&lt;/span&gt;
git log
git log &lt;span class="nt"&gt;--oneline&lt;/span&gt;
git branch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The next step is to create a respiratory in your github account that is linked to your gitbash then copy the link on the SSH key. Get back to gitbash and follow the steps in the block of code below;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git remote add origin &amp;lt;&lt;span class="nb"&gt;paste&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
git remote &lt;span class="nt"&gt;-v&lt;/span&gt;
git push &lt;span class="nt"&gt;-u&lt;/span&gt; origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Other commands used in Git
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cd&lt;/code&gt; used to change directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cd ..&lt;/code&gt; used to get backwards with one step&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;mkdir&lt;/code&gt; used to make a new folder&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ls&lt;/code&gt; used to list folders&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ls -la&lt;/code&gt; used to list all files &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;touch&lt;/code&gt; used to make a new file&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;echo " heading" &amp;gt; README.md&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Nano README.md&lt;/code&gt; used to write long texts&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cat README.md&lt;/code&gt; Used to read texts in README.md&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;In conclusion, Git is the industry-standard, open-source distributed version control system (DVCS) that acts as the backbone of modern software engineering. By utilizing a unique three-stage architecture &lt;strong&gt;(Working Directory, Staging Area, and Local Repository)&lt;/strong&gt;, Git optimizes how changes are tracked, stored, and managed over time. It bridges the gap between individual, experimental coding and large-scale, enterprise collaboration.&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>software</category>
      <category>softwareengineering</category>
    </item>
  </channel>
</rss>
