<?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: Vicky Gupta</title>
    <description>The latest articles on DEV Community by Vicky Gupta (@vicky_gupta_e97f7752abc47).</description>
    <link>https://dev.to/vicky_gupta_e97f7752abc47</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3735844%2Fb683635e-76f9-4762-a07e-f90c6d0dcf27.png</url>
      <title>DEV Community: Vicky Gupta</title>
      <link>https://dev.to/vicky_gupta_e97f7752abc47</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vicky_gupta_e97f7752abc47"/>
    <language>en</language>
    <item>
      <title>Git for Beginners: Basics and Essential Commands</title>
      <dc:creator>Vicky Gupta</dc:creator>
      <pubDate>Thu, 29 Jan 2026 01:39:55 +0000</pubDate>
      <link>https://dev.to/vicky_gupta_e97f7752abc47/git-for-beginners-basics-and-essential-commands-4be5</link>
      <guid>https://dev.to/vicky_gupta_e97f7752abc47/git-for-beginners-basics-and-essential-commands-4be5</guid>
      <description>&lt;h2&gt;
  
  
  What is Git
&lt;/h2&gt;

&lt;p&gt;Git is a software which is a Version Control System, which basically keeps the track of history changes, and helps in managing different timelines for developers&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Git is Used
&lt;/h2&gt;

&lt;p&gt;It is just used to keep the hustle out, when working in teams there might be conflicts while adding some feature or fixing a bug in the code.&lt;br&gt;
Git is easy to learn, and adds a lot of value&lt;/p&gt;
&lt;h2&gt;
  
  
  Git Basics and Core Terminologies
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;repository
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A repository is basically like a container, with all the code files, folder in it. We can say it is like parent folder for all the code files&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Commit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is like a snapshot of your whole at that point of time. Let's say i added a feature by adding 3 lines of code, then a commit will have information like: Author, Date &amp;amp; Time, Parent, Hash, etc.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Branch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Imagine all the commits are set on a track, then this track of all the history of commits is called a Branch.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Head
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is kind of a pointer which is automatically set to  the latest commit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Git Commands
&lt;/h2&gt;

&lt;p&gt;There are hundreds of git commands, but generally you will use only a few of them in your lifetime. Some of  them are mentioned below:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git init&lt;/code&gt; : This command sets up the folder/directory for your code. (A hidden .git folder is created in which all essentials are contained)&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%2Fc5szl21byb1mj9xzoe29.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%2Fc5szl21byb1mj9xzoe29.png" alt="Local repository structure overview" width="800" height="721"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git status&lt;/code&gt; : This tells you which files are modified, untracked, tracked&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git add &amp;lt;file_name&amp;gt;&lt;/code&gt; : This pushes the targeted file to staging area(It means that these changes are ready to commit)&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;git add .&lt;/code&gt; : This adds all the files to staging area at once.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;code&gt;git commit -m "your_message"&lt;/code&gt; : This command is to save a change permanently. The &lt;code&gt;-m&lt;/code&gt; flag is used to give the commit a message for example: if i added a function to multiply two integers, then the message can be: add a function for multiplication.&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%2Ftinkhq6wnfpsr30sc96y.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%2Ftinkhq6wnfpsr30sc96y.png" alt="Commit history flow" width="800" height="403"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The master is now called Main (it is the main branch)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git log&lt;/code&gt; : This Command shows the history of all the commits with all the information about each commit. For a compact output you can use &lt;code&gt;git log -oneline&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git branch&lt;/code&gt; : This shows all the branches for your repo.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git checkout -b "branch_name"&lt;/code&gt; : Creates a new branch and also switches to it at the same time.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git reset --hard &amp;lt;commit_hash&amp;gt;&lt;/code&gt; : Shifts the head to your desired commit and deletes the commits after that one.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;git reset &amp;lt;commit_hash&amp;gt;&lt;/code&gt; : shifts the head, but the commits after that are transferred to staging area.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;There are some of the most used and basic commands to work in git. If you want to read all the git commands &lt;a href="https://git-scm.com/cheat-sheet" rel="noopener noreferrer"&gt;read them here&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Basic Git workflow
&lt;/h3&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%2F3r2jrojraaqc70ue5v18.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%2F3r2jrojraaqc70ue5v18.png" alt="Git working directory → staging area → repository" width="686" height="396"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;Git is a very helpful tracking system for your code, you can install it in your system &lt;a href="https://git-scm.com/install/windows" rel="noopener noreferrer"&gt;from here&lt;/a&gt;, or you can simply use a remote like Github&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>github</category>
      <category>git</category>
      <category>cohort</category>
    </item>
    <item>
      <title>Why Version Control Exists: The Pendrive Problem</title>
      <dc:creator>Vicky Gupta</dc:creator>
      <pubDate>Thu, 29 Jan 2026 00:53:58 +0000</pubDate>
      <link>https://dev.to/vicky_gupta_e97f7752abc47/why-version-control-exists-the-pendrive-problem-4boj</link>
      <guid>https://dev.to/vicky_gupta_e97f7752abc47/why-version-control-exists-the-pendrive-problem-4boj</guid>
      <description>&lt;p&gt;Firstly you might be wondering what is a &lt;strong&gt;VCS(Version Control System)&lt;/strong&gt;, lets say you are writing a code and in that code you add a feature, fix a bug, then if a problem occurs after doing these changes how will you go back? Imagine if had checkpoints in code like games wouldn’t it be too good, that’s what VCS overall does. In this blog you will get an detailed overview of VCS.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Version Control Exists
&lt;/h2&gt;

&lt;p&gt;In the past, when people coded, they often faced the problem of tracking their code and getting help from others to improve it. For example, if I was writing code for a product and needed to hire an intern to add features, I had to send the code files through &lt;strong&gt;mail, drive, or using a pendrive with folders like&lt;/strong&gt; &lt;code&gt;final&lt;/code&gt; &lt;code&gt;final-v2&lt;/code&gt; etc. This process was very messy.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;When working in team, there was problems such as :&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Overwriting Code&lt;/strong&gt; : If i am trying to fix a bug, and i can’t do it i will share the file to someone else like &lt;code&gt;bug_fix1&lt;/code&gt;, then another person will figure out the bug and will try to solve it but while fixing it he might repeat some lines i already wrote to fix the bug.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Loosing Changes&lt;/strong&gt; : While fixing a bug, if another bug pops up you don’t have an option to go back.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;No Collaboration History&lt;/strong&gt; : Who made a specific change in the code is unkonwn.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Then comes &lt;strong&gt;VCS(Version Control System)&lt;/strong&gt; : a code tracking system that kept the history of all the changes done in the code by everyone, this also helped in better collaboration of people.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Pendrive Analogy in Software Development
&lt;/h2&gt;

&lt;p&gt;The time before VCS, when there was no version control, no tracking of code people used to share the codes using pendrives and had to tackle with folders like &lt;code&gt;final_v2&lt;/code&gt;, let’s say i give my code to my friend in a pendrive then he works upon it and give me back the folder like &lt;code&gt;final_final_v2&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problems Faced Before Version Control Systems
&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%2Fvvpce1htpbfnw9f4duy1.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%2Fvvpce1htpbfnw9f4duy1.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;With no shared tracking system there were many problems like :&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;“Who has the latest file” : In collaboration many people have their own version of code, with no source of truth&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;“I fixed it yesterday” Problem : without version history nobody can prove anything properly, like - &lt;em&gt;this bug was not there yesterday - you broke it&lt;/em&gt; - overall blame game becomes strong&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&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%2Flhdgj9vaa21gtuy2xb8i.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%2Flhdgj9vaa21gtuy2xb8i.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;br&gt;
The pendrive workflow might workout with 2 people, but when there are 10s or more devs then it becomes pure chaos that was very hard to control. So VCS solved not only the tracking changes problem but also made the collaboration way better, that is why for &lt;strong&gt;single source of truth&lt;/strong&gt; VCS is handy&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>git</category>
      <category>hiteshchaudhary</category>
    </item>
  </channel>
</rss>
