<?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: Javan P</title>
    <description>The latest articles on DEV Community by Javan P (@javan_p_962641807facd5030).</description>
    <link>https://dev.to/javan_p_962641807facd5030</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%2F4071759%2F66c3fee0-a8b6-4699-93fa-7452bad42e1f.png</url>
      <title>DEV Community: Javan P</title>
      <link>https://dev.to/javan_p_962641807facd5030</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/javan_p_962641807facd5030"/>
    <language>en</language>
    <item>
      <title>Understanding the Git Workflow: Working Directory, Staging, Commit and Push</title>
      <dc:creator>Javan P</dc:creator>
      <pubDate>Tue, 25 Aug 2026 20:26:16 +0000</pubDate>
      <link>https://dev.to/javan_p_962641807facd5030/understanding-the-git-workflow-working-directory-staging-commit-and-push-14hc</link>
      <guid>https://dev.to/javan_p_962641807facd5030/understanding-the-git-workflow-working-directory-staging-commit-and-push-14hc</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Git is a version control system. &lt;br&gt;
It runs on your computer and keeps track of changes made to your project.&lt;br&gt;
Git workflow are steps you take to move a change from your local files into a shared project history. In its simplest form, it's a pipeline with four stages:&lt;br&gt;
Working Directory → Staging Area → Commit → Push&lt;/p&gt;
&lt;h3&gt;
  
  
  working directory
&lt;/h3&gt;

&lt;p&gt;Is "Where You Make Changes", It is simply the folder on your computer where your project files are located. You can open and edit a file. Git notices, but it doesn't do anything about it yet. It just marks the file as modified. The current state of the project can be checked using;&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Running this command shows you what's changed since your last commit.&lt;/p&gt;

&lt;h3&gt;
  
  
  Staging area
&lt;/h3&gt;

&lt;p&gt;The staging area is where Git's workflow becomes useful. Instead of committing everything you've changed, you get to pick and choose exactly what goes into your next commit.&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 filename.js      
git add &lt;span class="nb"&gt;.&lt;/span&gt;                          
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Commit
&lt;/h3&gt;

&lt;p&gt;A commit takes everything in the staging area and permanently records it in your project's history.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt;&lt;span class="s2"&gt;"..."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;git commit- saves whatever is currently staged.&lt;br&gt;
-m"..."   - Explains the contents.&lt;/p&gt;
&lt;h3&gt;
  
  
  Push
&lt;/h3&gt;

&lt;p&gt;Everything so far has happened locally. Push is the step where your commits travel from your machine to a remote repository like GitHub so others can access them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Git workflow
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Check what changed&lt;/span&gt;
git status

&lt;span class="c"&gt;# 2. Stage the changes you want to commit&lt;/span&gt;
git add app.js

&lt;span class="c"&gt;# 3. Commit with a descriptive message&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"..."&lt;/span&gt;

&lt;span class="c"&gt;# 4. Push to the remote repository&lt;/span&gt;
git push origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;Git's workflow — working directory → stage → commit → push — is really just a series of checkpoints that give you control over how your code gets saved and shared.&lt;br&gt;
You edit your files (working directory), pick which changes you want to save (staging), save them for good (commit), and then send them to others (push).&lt;br&gt;
Each step has a purpose: staging lets you choose what to save instead of saving everything at once, committing keeps a safe copy of your work on your own computer, and pushing is when you decide to share that work with others.&lt;/p&gt;

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