<?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: Max Njiru</title>
    <description>The latest articles on DEV Community by Max Njiru (@maxnjiru).</description>
    <link>https://dev.to/maxnjiru</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%2F4071729%2F678aada4-4df9-4d95-8ec7-9fa0b653469a.png</url>
      <title>DEV Community: Max Njiru</title>
      <link>https://dev.to/maxnjiru</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/maxnjiru"/>
    <language>en</language>
    <item>
      <title>GIT WORKFLOW</title>
      <dc:creator>Max Njiru</dc:creator>
      <pubDate>Mon, 24 Aug 2026 18:04:18 +0000</pubDate>
      <link>https://dev.to/maxnjiru/git-workflow-5119</link>
      <guid>https://dev.to/maxnjiru/git-workflow-5119</guid>
      <description>&lt;p&gt;During my practical sessions at Luxdev HQ, I started working with Git and GitHub as part of my development workflow. At first, some of the commands seemed to do almost the same thing, especially git add, git commit, and git push. With practice, I started understanding that each command represents a different stage of the workflow&lt;br&gt;
In this article, I will explain each stage using a simple Python project and some of the commands I have been practicing.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Starting With a Simple Project
&lt;/h2&gt;

&lt;p&gt;For this example, imagine that I am working on a small Python calculator project.&lt;/p&gt;

&lt;p&gt;My project folder might look like this:&lt;br&gt;
mycalculator/&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; calculator.py&lt;/li&gt;
&lt;li&gt; README.md&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Inside calculator.py, I could start with something very simple&lt;/p&gt;

&lt;p&gt;&lt;code&gt;print("Welcome to my calculator")&lt;/code&gt;&lt;br&gt;
At this point, I am just working normally on my computer. I can open the file in VS Code, change the code, save it, and continue working.&lt;/p&gt;

&lt;p&gt;This is where the working directory comes in&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Understanding the Working Directory
&lt;/h2&gt;

&lt;p&gt;`The working directory is basically the project folder where I am doing my actual work.&lt;/p&gt;

&lt;p&gt;If I create a new file, edit an existing file, or delete a file, those changes happen in my working directory.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;print("Welcome to my Python calculator")&lt;/code&gt;&lt;br&gt;
I have changed the file, but I have not yet told Git that I want to record this change.&lt;/p&gt;

&lt;p&gt;This is where I found &lt;strong&gt;&lt;em&gt;git status&lt;/em&gt;&lt;/strong&gt; very useful.&lt;br&gt;
I started thinking of git status as my what is going on? command.&lt;/p&gt;

&lt;p&gt;Whenever I am not sure what Git knows about my project, I can run &lt;strong&gt;git status&lt;/strong&gt; and see which files have been changed, which files are untracked, and which changes are staged.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Understanding Untracked and Modified Files
&lt;/h2&gt;

&lt;p&gt;One thing a beginner can easily find confusing is the difference between an untracked file and a modified file.&lt;/p&gt;

&lt;p&gt;Suppose I create a new file called:&lt;br&gt;
&lt;code&gt;hello.py&lt;/code&gt;&lt;br&gt;
Git may show it as an untracked file&lt;br&gt;
On the other hand, if Git already knows about &lt;code&gt;calculator.py&lt;/code&gt; and I change something inside it, Git can tell me that the file has been modified.&lt;br&gt;
So I can think about it like this:&lt;br&gt;
Untracked&lt;br&gt;
→ Git has not started tracking this file.&lt;/p&gt;

&lt;p&gt;Modified&lt;br&gt;
→ Git already knows the file, but I have changed it.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. The Staging Area
&lt;/h2&gt;

&lt;p&gt;This was one of the parts I had to think about the most when learning Git.&lt;/p&gt;

&lt;p&gt;At first, I wondered:&lt;/p&gt;

&lt;p&gt;If I have already changed my file, why do I need to add it?&lt;/p&gt;

&lt;p&gt;I eventually understood that Git gives me a staging area where I can select the changes that I want to include in my next commit.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;code&gt;git add calculator.py&lt;/code&gt;&lt;br&gt;
This tells Git that I want the changes in &lt;code&gt;calculator.py &lt;/code&gt;to be included in my next commit.&lt;/p&gt;

&lt;p&gt;The important thing I learned is that git add does not upload the file to GitHub.&lt;/p&gt;

&lt;h3&gt;
  
  
  11. The Difference Between Commit and Push
&lt;/h3&gt;

&lt;p&gt;It simply moves the change from my working directory into the staging area.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Creating a Commit
&lt;/h2&gt;

&lt;p&gt;Once I am satisfied with the changes I have staged, I can create a commit.&lt;br&gt;
&lt;code&gt;git commit -m "Update calculator message"&lt;/code&gt;&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
