<?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: Adolph Ochieng</title>
    <description>The latest articles on DEV Community by Adolph Ochieng (@expertwriter).</description>
    <link>https://dev.to/expertwriter</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%2F4088714%2Fd85dedea-64fb-4738-b297-5b8643a4b504.jpg</url>
      <title>DEV Community: Adolph Ochieng</title>
      <link>https://dev.to/expertwriter</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/expertwriter"/>
    <language>en</language>
    <item>
      <title>Understanding Git Workflow from Working Directory, Staging, Commit, and Push.</title>
      <dc:creator>Adolph Ochieng</dc:creator>
      <pubDate>Sun, 23 Aug 2026 20:34:12 +0000</pubDate>
      <link>https://dev.to/expertwriter/understanding-git-workflow-from-working-directory-staging-commit-and-push-4kdi</link>
      <guid>https://dev.to/expertwriter/understanding-git-workflow-from-working-directory-staging-commit-and-push-4kdi</guid>
      <description>&lt;h2&gt;
  
  
  Git
&lt;/h2&gt;

&lt;p&gt;Git is used to track changes in files and allow for managing ythe developmnet of projects, especially those that entail data. I used git to enable me record the different versions of my data from the original raw data, compare changes, without interfering with the initial data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Git Workflow
&lt;/h2&gt;

&lt;p&gt;Git has a series of commands that are important for committing changes and tracking the data. The commands are described as a &lt;strong&gt;Git Workflow&lt;/strong&gt; as it involves checking the status of the current project, making changes to the projects by adding files, and committing the changes. The Git Workflow is quite vital as it allows for a systematic and organised way of managing changes, keeping a record of every progress, and making it easier to identify the areas that changes were made.&lt;/p&gt;

&lt;p&gt;My project was Kenya Health Records Analysis and it contained and excel data, thus was in this structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`Kenya Health Records Analysis/ 
- Kenya Health Records Analysis.xlsx 
- README.md`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Checking the Project Directory
&lt;/h4&gt;

&lt;p&gt;I used &lt;code&gt;cd "Kenya Health Records Analysis"&lt;/code&gt; to access the project directory then ran the command &lt;code&gt;ls -la&lt;/code&gt; to list the contents that were in the directory&lt;/p&gt;

&lt;h4&gt;
  
  
  Checking README File
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;cat README.md&lt;/code&gt;&lt;br&gt;
This displayed the contents of the file such as the Title, tools used, and the challenges faced.&lt;/p&gt;
&lt;h4&gt;
  
  
  Initialize Git
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;git init&lt;/code&gt;&lt;br&gt;
I ran this command to instruct Git that I needed the project to become a git repository.&lt;br&gt;
To confirm whether it was successful, I ran the command &lt;code&gt;ls -la&lt;/code&gt;and &lt;code&gt;git status&lt;/code&gt;&lt;/p&gt;
&lt;h5&gt;
  
  
  Changing a file
&lt;/h5&gt;

&lt;p&gt;I was able to edit and modify my project in this stage by opening the &lt;code&gt;README.md&lt;/code&gt; file and adding more information in the &lt;strong&gt;Challenges Faced&lt;/strong&gt; section.&lt;br&gt;
I then ran &lt;code&gt;git status&lt;/code&gt; but got this error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;`Changes not staged for commit: 
      modified: README.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I noted that changing a file does not directly create a commit. I therefore, ran &lt;code&gt;git add README.md&lt;/code&gt; which communicates to git to adjust the changes.&lt;/p&gt;

&lt;h4&gt;
  
  
  Commit
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;git commit -m&lt;/code&gt;&lt;br&gt;
This was for creating a checkpoint in the project analysis by recording the changes I have done in the project. It also allowed for me to continue working without having to push the changes in Github immediately.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git commit -m "Kenya Health Records Analysis"&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Checking Commit History
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;git log --oneline&lt;/code&gt;&lt;br&gt;
This command allowed me to inspect every of my commit history&lt;/p&gt;

&lt;p&gt;This is followed by &lt;code&gt;git status&lt;/code&gt; to understand the current state of the project&lt;/p&gt;

&lt;h4&gt;
  
  
  Push
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;git push&lt;/code&gt;&lt;br&gt;
After making the challenges locally, I ran &lt;code&gt;git push origin main&lt;/code&gt; to send them to the remote repository.&lt;/p&gt;

&lt;h3&gt;
  
  
  Functions of Git
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Track changes&lt;/li&gt;
&lt;li&gt;Create commits&lt;/li&gt;
&lt;li&gt;Mmaintain project history&lt;/li&gt;
&lt;li&gt;Manage different versions of my project locally&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;During this project, I learnt that Git workflow is a sequence and not just a list of random commands. It starts from inspecting the project files with &lt;code&gt;ls -la&lt;/code&gt; and then reading the documentation through running &lt;code&gt;cat README.md.&lt;/code&gt; I can then run &lt;code&gt;git status&lt;/code&gt; to understand the latest status of the repository. After this, I commit using &lt;code&gt;git commit -m&lt;/code&gt;, and can review the history using &lt;code&gt;git log --oneline.&lt;/code&gt;To finally share the local commits I made, I ran the command &lt;code&gt;git push origin main.&lt;/code&gt;&lt;br&gt;
Understanding this workflow gave me essential foundation for working with data analytics project as the one in &lt;strong&gt;Kenya Health Records Analysis&lt;/strong&gt; in terms of documenting my work, and building a portfolio as a Data Scientist.&lt;/p&gt;

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