<?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: bhushan mhaske</title>
    <description>The latest articles on DEV Community by bhushan mhaske (@ste_bhushhan).</description>
    <link>https://dev.to/ste_bhushhan</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%2F3960196%2F1b149d59-3275-49b5-b21a-cb5e0d961112.jpg</url>
      <title>DEV Community: bhushan mhaske</title>
      <link>https://dev.to/ste_bhushhan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ste_bhushhan"/>
    <language>en</language>
    <item>
      <title>Insights of git (part :2)</title>
      <dc:creator>bhushan mhaske</dc:creator>
      <pubDate>Sun, 31 May 2026 12:13:23 +0000</pubDate>
      <link>https://dev.to/ste_bhushhan/insights-of-git-part-2-29l0</link>
      <guid>https://dev.to/ste_bhushhan/insights-of-git-part-2-29l0</guid>
      <description>&lt;h2&gt;
  
  
  introduction
&lt;/h2&gt;

&lt;p&gt;We all use 'git' and it's features in daily basis while doing code or working on projects , in-fact it is essential. But , many of us just use git commands they don't understands what actually happens inside the .git repository when they use commands like &lt;code&gt;git init&lt;/code&gt; ,&lt;code&gt;git add&lt;/code&gt; ,&lt;code&gt;git commit&lt;/code&gt; ,&lt;code&gt;git push&lt;/code&gt; etc..&lt;br&gt;
Let's discuss the behind the scene of git .&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The .git Folder&lt;/strong&gt;&lt;br&gt;
when we use command &lt;code&gt;git init&lt;/code&gt; the .git folder creates in your project . &lt;br&gt;
your project folder is not a repository it's just a working directory ,&lt;br&gt;
.git folder is actual respository.&lt;/p&gt;

&lt;p&gt;see below the structure of .git folder (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.amazonaws.com%2Fuploads%2Farticles%2Fo3v7l54nz49bowitg641.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fo3v7l54nz49bowitg641.jpg" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;let's discuss one-by-one -&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.HEAD&lt;/strong&gt;  - head is just pointer which points to the current checked-out branch (or) latest commit &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.config&lt;/strong&gt; - config file contains repository specific settings&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.index&lt;/strong&gt; - index file is the staging area , basically stores the stage files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.object&lt;/strong&gt; - objects stores the actual data , there are 3 types of objects - blob , tree , commit. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5.refs&lt;/strong&gt; - gives the references about the tags and branch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6.log&lt;/strong&gt; - log file stores the all history of commits.&lt;br&gt;
this is the basic git folder structure.&lt;/p&gt;

&lt;h2&gt;
  
  
  git objects - Blob , Tree , Commit.
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;whatever we stores in git using &lt;code&gt;git commit -m "message"&lt;/code&gt; command the git stores it as a object .&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;1] Blob&lt;/strong&gt; - it stores the content of a file . and doesn't care about file name and all , only stores the content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2] Tree&lt;/strong&gt; - represents the structure of a directory .&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3]Commit&lt;/strong&gt; - snapshot of a project at a point of time &lt;br&gt;
           - includes Author,Date &amp;amp; Time,hash,parent hash,Commit message&lt;/p&gt;

&lt;h2&gt;
  
  
  What happens internally during &lt;code&gt;git add&lt;/code&gt; and &lt;code&gt;git commit&lt;/code&gt;
&lt;/h2&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.amazonaws.com%2Fuploads%2Farticles%2Fkv5n2hd6wsr3b2gfqwvr.webp" 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.amazonaws.com%2Fuploads%2Farticles%2Fkv5n2hd6wsr3b2gfqwvr.webp" alt=" " width="800" height="518"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;What happens during git add&lt;/strong&gt;&lt;br&gt;
   when u run &lt;code&gt;git add file.txt&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;-Git takes the content of the file and creates blob objects for the current file content.&lt;/p&gt;

&lt;p&gt;-Then Git generates a unique SHA-1 hash (a 40-character string) based on the file content. The first two characters of the hash become the folder name, and the remaining 38 become the filename.&lt;/p&gt;

&lt;p&gt;-Finally, Git updates the staging area (index) to track the snapshot that will be committed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happens during git commit&lt;/strong&gt;&lt;br&gt;
   when u run &lt;code&gt;git commit -m "message"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;-It transforms what’s in the staging area into a snapshot, which is stored in the Git repository history.&lt;/p&gt;

&lt;p&gt;-Each commit is given a unique hash to identify it.&lt;/p&gt;

&lt;p&gt;-The -m flag allows you to include a message directly in the command.&lt;/p&gt;

&lt;p&gt;-Commits should always have a descriptive message.&lt;/p&gt;

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

&lt;p&gt;&lt;code&gt;Git&lt;/code&gt;is a powerful version control system that operates as a key-value database, ensuring the reliability and integrity of your project versions.&lt;/p&gt;

&lt;p&gt;The .git folder is the core of your Git repository, storing the entire history, branches, and snapshots of your project. Understanding the internal workings of Git, including its objects like blobs, trees, and commits, as well as the processes of  &lt;code&gt;git add&lt;/code&gt; and &lt;code&gt;git commit&lt;/code&gt;&lt;/p&gt;

</description>
      <category>git</category>
      <category>gitinsights</category>
    </item>
    <item>
      <title>Insights of Git ( part : 1 )</title>
      <dc:creator>bhushan mhaske</dc:creator>
      <pubDate>Sat, 30 May 2026 19:20:51 +0000</pubDate>
      <link>https://dev.to/ste_bhushhan/insights-of-git-part-1--4mo8</link>
      <guid>https://dev.to/ste_bhushhan/insights-of-git-part-1--4mo8</guid>
      <description>&lt;p&gt;Today let's understand what actually a git is , and basics of git : :&lt;/p&gt;

&lt;p&gt;When we start developing something , whether it is software projects , fixing bugs , testing code etc .&lt;br&gt;
The common problem we all are facing which is to maintain the log / history of the work that we are doing . Here the 'git' comes in the picture . &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is Git ?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;So basically 'git' is the version control system(VCS) , which helps us to track changes in code and files over a time .&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;official website - &lt;a href="https://git-scm.com/" rel="noopener noreferrer"&gt;https://git-scm.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why git is used ?&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;To save and track changes - git tracks all history of what changes , where changes , who changes the code .&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To go on older version of code .&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To work on new features seperatly and safely without changing / touching the source code or main code .&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;4.Helps to collaborating with others in teams .&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;git workflow&lt;/strong&gt; -&lt;/p&gt;
&lt;/blockquote&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.amazonaws.com%2Fuploads%2Farticles%2Fz6ijf1kbghfi3sgzw782.webp" 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.amazonaws.com%2Fuploads%2Farticles%2Fz6ijf1kbghfi3sgzw782.webp" alt=" " width="800" height="518"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now let's the basic git terminologies and commands -- &lt;/p&gt;

&lt;h2&gt;
  
  
  basic git commands
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;git init&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;git status&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;git log&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;git add&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;git commit -m "message"&lt;/code&gt;&lt;/strong&gt; ;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;1]. &lt;strong&gt;git init&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;git init&lt;/code&gt; - command is used to initialize the new repository , or to reinitiliazing the exiting one. It creates a hidden '.git' repository in our project directory that allows git to track changes and save the changes .&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.amazonaws.com%2Fuploads%2Farticles%2Fide8qeu4la984he3vl5u.webp" 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.amazonaws.com%2Fuploads%2Farticles%2Fide8qeu4la984he3vl5u.webp" alt=" " width="563" height="104"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;.git repository - is the hidden folder in your project folder in which git keeps your code changes , history of changes , all commits , head etc .&lt;/p&gt;

&lt;p&gt;head - head simplyy points to the latest commit .&lt;/p&gt;

&lt;p&gt;2]. &lt;strong&gt;git status&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;git status&lt;/code&gt; - command is used to check your current state of a working directory , helps us to understand which file is modified , which is untracked and which is staged . &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.amazonaws.com%2Fuploads%2Farticles%2Fd5epi6kn8stndu6cpof0.webp" 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.amazonaws.com%2Fuploads%2Farticles%2Fd5epi6kn8stndu6cpof0.webp" alt=" " width="563" height="76"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3]. &lt;strong&gt;git log&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;git log&lt;/code&gt; - command is used to view all history of commit .it shows author of commits ,date and time of commit , commit hash , commit message.&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.amazonaws.com%2Fuploads%2Farticles%2Fnm3sdfdj0891pgj1fppu.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.amazonaws.com%2Fuploads%2Farticles%2Fnm3sdfdj0891pgj1fppu.png" alt=" " width="743" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4]. &lt;strong&gt;git add&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;git add&lt;/code&gt; - command is used to move changes from working directory to staging area . &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;git add .&lt;/code&gt; - moves all untracked files and unstage changes to staginf area .&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.amazonaws.com%2Fuploads%2Farticles%2Ffrfvaqjle94vsah086ei.webp" 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.amazonaws.com%2Fuploads%2Farticles%2Ffrfvaqjle94vsah086ei.webp" alt=" " width="608" height="248"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5]. &lt;strong&gt;git commit&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;git commit&lt;/code&gt; - command stores the staged changes into the local '.git' repository . we send one commit message which shows what changes we did in code .&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.amazonaws.com%2Fuploads%2Farticles%2F7aejt77m0ef6i74iw8ua.webp" 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.amazonaws.com%2Fuploads%2Farticles%2F7aejt77m0ef6i74iw8ua.webp" alt=" " width="575" height="203"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;6]. &lt;strong&gt;git push&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;git push&lt;/code&gt; - command uploads commited changes from local repository to remote repository (Github).&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.amazonaws.com%2Fuploads%2Farticles%2Fn6xref4n1z24yxe9nd3k.webp" 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.amazonaws.com%2Fuploads%2Farticles%2Fn6xref4n1z24yxe9nd3k.webp" alt=" " width="595" height="180"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;7]. &lt;strong&gt;git branch&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;git branch&lt;/code&gt; - command creates new branch from main branch .&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.amazonaws.com%2Fuploads%2Farticles%2Fipkcyen1f0prnlomnpd9.webp" 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.amazonaws.com%2Fuploads%2Farticles%2Fipkcyen1f0prnlomnpd9.webp" alt=" " width="800" height="163"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;8]. &lt;strong&gt;git checkout -b "branch-name"&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;git branch&lt;/code&gt; - command show the current working branch and propogates into new branch&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.amazonaws.com%2Fuploads%2Farticles%2F3ulb0h80ezdx6hve8rd7.webp" 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.amazonaws.com%2Fuploads%2Farticles%2F3ulb0h80ezdx6hve8rd7.webp" alt=" " width="785" height="374"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Basic workflow of the commands -
&lt;/h2&gt;

&lt;p&gt;(stepwise)&lt;br&gt;
1.&lt;strong&gt;&lt;code&gt;git init&lt;/code&gt;&lt;/strong&gt; - starts empty git repository.&lt;br&gt;
2.&lt;strong&gt;&lt;code&gt;git status&lt;/code&gt;&lt;/strong&gt; - shows the status of working directory&lt;br&gt;
3.&lt;strong&gt;&lt;code&gt;git add&lt;/code&gt;&lt;/strong&gt; - moves untracked file and unstaged changes to the staging area&lt;br&gt;
4.&lt;strong&gt;&lt;code&gt;git commit -m "message"&lt;/code&gt;&lt;/strong&gt; - saves the chanegs to local git repository&lt;/p&gt;

</description>
      <category>blog</category>
      <category>git</category>
    </item>
  </channel>
</rss>
