<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[basic and essential git for beginners]]></title><description><![CDATA[basic and essential git for beginners]]></description><link>https://basic-and-essential-git-for-beginners.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Wed, 23 Sep 2026 18:48:34 GMT</lastBuildDate><atom:link href="https://basic-and-essential-git-for-beginners.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Git for Beginners: Basics and Essential Fundamentals]]></title><description><![CDATA[What is GIT?
Git is a really handy and helpful tool which helps as a version control system for developers.By version control, in simple words, i mean HISTORY + BACKUP + TEAMWORK tool.HISTORY : Tracks every changes that you or your team make.BACKUP: ...]]></description><link>https://basic-and-essential-git-for-beginners.hashnode.dev/git-for-beginners-basics-and-essential-fundamentals</link><guid isPermaLink="true">https://basic-and-essential-git-for-beginners.hashnode.dev/git-for-beginners-basics-and-essential-fundamentals</guid><category><![CDATA[Git]]></category><category><![CDATA[GitHub]]></category><category><![CDATA[Gitcommands]]></category><dc:creator><![CDATA[Baibhav Tibrewal]]></dc:creator><pubDate>Sun, 18 Jan 2026 18:30:00 GMT</pubDate><content:encoded><![CDATA[<p>What is GIT?</p>
<p>Git is a really handy and helpful tool which helps as a version control system for developers.<br />By version control, in simple words, i mean HISTORY + BACKUP + TEAMWORK tool.<br />HISTORY : Tracks every changes that you or your team make.<br />BACKUP: Those tracked changes you can save and have a backup to go in history.<br />TEAMWORK: Lets your team collaborate on a single project easily by using branches.</p>
<h2 id="heading-why-git"><strong>WHY GIT?</strong></h2>
<p>Without GIT:<br />You write some code, manually saved it, now you want another version of it, you will have to make another copy of the code or delete the previous code to update or rewrite the code and if your brother/friend starts wirting code on the same file using your computer it’ll be total chaos, you won’t know who wrote which line, you can not make copies on copies it will be messy, you can’t get back deleted code.</p>
<p>This is what GIT sovles:<br />You wrote code, saved it, GIT will automatically take a snapshot of it and now it is saved for future in case you have made a mistake or want to update the existing code you can easily do it and save it again for another snapshot, now it is the 2nd version, you can also delete any version. If you have a whole team working on the same project, you can easily merge each and everybody’s code.</p>
<p>Your code is safe on your system but you can also save on online platforms like GITHUB.</p>
<h2 id="heading-git-basics-and-core-terminologies"><strong>GIT BASICS and CORE TERMINOLOGIES</strong></h2>
<p>There are a bunch of terminologies one must know to operate and go around GIT, and they are as follows:</p>
<ol>
<li><p>Repository (Repo)</p>
<p> A respository is a folder that contains your files, history of changes and these files can be stored online (github) or offline (on your computer)</p>
</li>
<li><p>Working Directory:</p>
<p> This is where we write code, edit files and delete or add files</p>
</li>
<li><p>Staging Area:</p>
<p> Staging area acts as a mediator as it asks for the files to be commited, we select the files of which changes should be included in the next commit.</p>
</li>
<li><p>Commit:</p>
<p> Commit is the snapshot of your project at a specific point in time, each commit has a unique ID (hash), a message describing the changes and save the changes permanently.</p>
<p> Commit History is also maintained along with the commits which can be accessed by using this command: git log</p>
</li>
<li><p>Branch</p>
<p> A branch is an indepenent line of development, we or our team work on these branches, and moslty default branch is known as main branch.</p>
<p> A person working on a other branch can not affect the main code unless merged together.</p>
<p> Merging combines changes from one branch into another</p>
</li>
<li><p>Clone a Repository:</p>
<p> Cloning creates a local copy of a remote repository of the cloned project, you will have all the files saved locally on your PC.</p>
</li>
<li><p>Pull:</p>
<p> Pull fetches and merges changes from the remote repository to our local repository.</p>
<p> Whatever changes that were made by others will now be saved on our local codebase as well.</p>
</li>
<li><p>Push:</p>
<p> Push sends our local commits to the remote repository for others working on the same team.</p>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1768646915738/965cb8e2-51e4-4b2f-a5a3-5578d1cb5960.png" alt /></p>
<h2 id="heading-common-git-commands"><strong>Common Git Commands</strong></h2>
<ol>
<li><p>We can initialize a new Git repository in the current folder by using:</p>
<p> git init</p>
</li>
<li><p>To know the current state of the repository we use:</p>
<p> git status</p>
</li>
<li><p>To add the changes to the staging area which we have made to our code:</p>
<p> git add yourfile</p>
<p> For add everything at once we can use . in place of yourfile eg:</p>
<p> git add .</p>
</li>
<li><p>To commit or take a snapshot of the staged changes we use:</p>
<p> git commit -m “message goes here”</p>
</li>
<li><p>To look at commit history:</p>
<p> git log</p>
</li>
<li><p>To clone a repo we can use:</p>
<p> git clone repoURL</p>
</li>
<li><p>To manage brance or to create a new branch we can use:</p>
<p> git branch</p>
<p> git branch branch-name</p>
</li>
<li><p>To switch to another branch or commits:</p>
<p> git checkout branch-name</p>
</li>
<li><p>To combine one branch into another we can use:</p>
<p> git merge feature-login</p>
</li>
<li><p>To fetch and merge changes from the remote repository:</p>
<p>git pull</p>
</li>
<li><p>To upload local commits to the remote repository:</p>
<p>git push origin main</p>
</li>
</ol>
]]></content:encoded></item></channel></rss>