<?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: Abhishek Kumar</title>
    <description>The latest articles on DEV Community by Abhishek Kumar (@iambhishek01).</description>
    <link>https://dev.to/iambhishek01</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%2F3743961%2Fd7083ded-f1a7-429a-916a-1802e488927d.jpg</url>
      <title>DEV Community: Abhishek Kumar</title>
      <link>https://dev.to/iambhishek01</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/iambhishek01"/>
    <language>en</language>
    <item>
      <title>Git Basics Made Simple: Essential Commands Every Developer Should Know</title>
      <dc:creator>Abhishek Kumar</dc:creator>
      <pubDate>Sat, 31 Jan 2026 21:04:50 +0000</pubDate>
      <link>https://dev.to/iambhishek01/git-basics-made-simple-essential-commands-every-developer-should-know-2ed1</link>
      <guid>https://dev.to/iambhishek01/git-basics-made-simple-essential-commands-every-developer-should-know-2ed1</guid>
      <description>&lt;p&gt;Hello readers, Welcome back&lt;/p&gt;

&lt;p&gt;In the previous blog, I shared the story related to the problems developers face without Git — the well-known pendrive problem. You understood why Git is important and how it helps us make our developer journey smooth.&lt;/p&gt;

&lt;p&gt;If you are new, then you can checkout my first of this git series:&lt;br&gt;
Blog 1 : &lt;a href="https://dev.to/iambhishek01/why-git-exists-the-pendrive-problem-4117"&gt;Why git exist: the pendrive problem&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this blog, I’m going to teach you the basics of Git and Git commands with stories and in depth.&lt;/p&gt;

&lt;h2&gt;
  
  
  Blog Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;What is Git?
&lt;/li&gt;
&lt;li&gt;Why Git is Used
&lt;/li&gt;
&lt;li&gt;Git Basics and Terminologies
&lt;/li&gt;
&lt;li&gt;Basic Commands of Git

&lt;ul&gt;
&lt;li&gt;git init
&lt;/li&gt;
&lt;li&gt;git add
&lt;/li&gt;
&lt;li&gt;git commit
&lt;/li&gt;
&lt;li&gt;git status
&lt;/li&gt;
&lt;li&gt;git log
&lt;/li&gt;
&lt;li&gt;git diff
&lt;/li&gt;
&lt;li&gt;git revert
&lt;/li&gt;
&lt;li&gt;git reset

&lt;ul&gt;
&lt;li&gt;git reset --hard
&lt;/li&gt;
&lt;li&gt;git reset --soft
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Conclusion
&lt;/li&gt;
&lt;li&gt;What’s Next&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What is git?
&lt;/h2&gt;

&lt;p&gt;Git is a version control system that helps developers track their code. It keeps track of code changes in your project along with the author information of who made those changes.&lt;/p&gt;

&lt;p&gt;It was developed by Linus Torvalds (the developer of Linux) in 2005. It was created to handle the complexity of the Linux project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why git is used?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;To Time Travel:&lt;/strong&gt; Yes, if you want to time travel, then use Git. Git keeps track of all your changes, and if you have made a mistake in the past, it allows you to go back to that code and fix it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Smooth collaborations:&lt;/strong&gt; Git helps you easily collaborate with your fellow developers, review their code changes, and work with the team without conflicts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rapid Development:&lt;/strong&gt; Git allows developers to work on multiple independent features simultaneously using features like branching and merging.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Git Basics and Terminologies
&lt;/h2&gt;

&lt;p&gt;Here are some core terminologies you should know before jumping into the commands:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Repositery:&lt;/strong&gt; It is your project folder where all your code files exist.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add:&lt;/strong&gt; It means you have started tracking your file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Commits:&lt;/strong&gt; It means making your changes permanent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Head:&lt;/strong&gt; HEAD is a pointer to your latest commit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Branch:&lt;/strong&gt; A branch means separating different features from your main code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pull:&lt;/strong&gt; Pulling code from a remote repository (GitHub, Bitbucket) and merging it into your local repository.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fetch:&lt;/strong&gt; Fetching code from a remote repository without merging it into your existing code.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Basic commands of Git
&lt;/h2&gt;

&lt;p&gt;To use Git, first you need Git installed on your computer. You can install it from the Git website: &lt;a href="https://git-scm.com/install/windows" rel="noopener noreferrer"&gt;https://git-scm.com/install/windows&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To check whether Git is available on your computer or not, run this command:&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%2F6om5xyr8uj42jzcq9934.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%2F6om5xyr8uj42jzcq9934.png" alt="check git version" width="800" height="137"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To track your repository’s code changes, you have to initialize Git in your project. Here is our first command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;git init:&lt;/strong&gt; Initializes an empty Git repository in your project.&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%2Fwsmjid5dmx6mnpfgpy9p.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%2Fwsmjid5dmx6mnpfgpy9p.png" alt="git init" width="800" height="209"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, your code files are ready to be tracked by Git. Whenever you create a new file in your project, it will be marked as untracked (U), which means Git is not tracking that file.&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%2Fljjycgjr6qhjr4g6pc0s.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%2Fljjycgjr6qhjr4g6pc0s.png" alt="vs code git symbols" width="800" height="291"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To track the file, you have to run:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;2. git add &lt;code&gt;&amp;lt;file_name&amp;gt;&lt;/code&gt;:&lt;/strong&gt; Adds the file to the staging area of Git. It means your file changes are under the surveillance of Git. The staging area is like a lobby where all the files that are being tracked by Git are placed.&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%2Fgpg46osiva3ipc1a0fve.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%2Fgpg46osiva3ipc1a0fve.png" alt="git add" width="800" height="197"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you have too many files to track or stage, then you can use &lt;strong&gt;git add .&lt;/strong&gt; This will add all your untracked or modified files to the staging 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%2Fojv8hru1gh20ygegyffd.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%2Fojv8hru1gh20ygegyffd.png" alt="git add 2" width="800" height="263"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, Git has started tracking your changes, and when you have finished making changes or reached a specific point, you need to make those changes permanent so that you don’t lose them. To do this, here is another command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;3. git commit -m &lt;code&gt;&amp;lt;commit_message&amp;gt;&lt;/code&gt;:&lt;/strong&gt; This command makes your changes permanent and removes your file from the staging area to the local Git repository.&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%2Foqsl3k6la76yelstrkoc.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%2Foqsl3k6la76yelstrkoc.png" alt="git commit" width="800" height="252"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each time you make a commit, it creates a unique hash, and each commit has the address of its previous commit. As a new commit hash is created, HEAD moves to that commit.&lt;/p&gt;

&lt;p&gt;The commit message is important; it should be precise about the changes you are committing. In this command, &lt;code&gt;-m&lt;/code&gt; means message. If you don’t add a message, this command will open a file where you need to enter your message and then close that file.&lt;/p&gt;

&lt;p&gt;To get the status of files in your project, such as modified or untracked, use this command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;4. git status:&lt;/strong&gt; It gives the status of your files.&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%2Ffg3dvya7bwljhtuqkq51.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%2Ffg3dvya7bwljhtuqkq51.png" alt="git status" width="800" height="451"&gt;&lt;/a&gt;&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%2Fbyn9rohxhlgw52qgar52.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%2Fbyn9rohxhlgw52qgar52.png" alt="git status 2" width="800" height="183"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To see all the commit details, you can use this command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;5. git log:&lt;/strong&gt; It shows the commit ID, author information, date, and time. It also shows which commit HEAD is pointing to.&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%2F2bh9h1o5k560j4093weu.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%2F2bh9h1o5k560j4093weu.png" alt="git log" width="800" height="419"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also use &lt;strong&gt;git log --oneline&lt;/strong&gt; to get a short summary. This will only include the short commit hash and the commit message.&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%2Faaqwy8vw9w0wtozjglth.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%2Faaqwy8vw9w0wtozjglth.png" alt="git log 1" width="800" height="125"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;6. git diff:&lt;/strong&gt; This command shows the difference between two commits. It takes the commit hash as input.&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%2Fsa7p9z3on3q0rjf3u8iu.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%2Fsa7p9z3on3q0rjf3u8iu.png" alt="git diff" width="778" height="358"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In case no commit hash is provided, it will show the overall recent changes.&lt;/p&gt;

&lt;p&gt;Until now, you are working smoothly and developing your features, but suddenly you encounter a bug in a commit. Now you need to revert that commit to run your project. To do this, there are multiple commands. One of them is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;7. git revert:&lt;/strong&gt; It takes a commit ID and reverts the changes by adding a new commit. In this new commit, the buggy part added in the given commit is removed. HEAD is also moved to this new commit.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The advantage of this command is that you retain the history of the code fault and its resolution.&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%2F8eejsvcswvb8o77wolx3.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%2F8eejsvcswvb8o77wolx3.png" alt="git revert" width="800" height="747"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another way is to move HEAD before the bug commit instead of adding a new commit. This will also remove the bug, but it will remove the history that the bug was introduced. For this, use the following command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;8. git reset:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
git reset has multiple options—either you move HEAD while deleting all the changes (&lt;code&gt;--hard&lt;/code&gt;), or you keep the changes in the staging area to be committed again (&lt;code&gt;--soft&lt;/code&gt;).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;a. git reset — hard HEAD~1:&lt;/strong&gt; This command moves HEAD one commit back and permanently deletes the changes along with the history. Use it at your own risk. Only use it when you know what you are doing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;b. git reset — soft HEAD~1:&lt;/strong&gt; This command moves HEAD one commit back and moves the changes to the staging area instead of deleting them. Now you can modify the files and fix the bug. After completing the fixes, commit again. This is safer than &lt;code&gt;--hard&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;


&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%2Fut2c3329kyx34won32w1.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%2Fut2c3329kyx34won32w1.png" alt="git reset" width="800" height="592"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  conclusion
&lt;/h2&gt;

&lt;p&gt;This brings us to the end of the Git basics and essential commands. By now, you should have a clear understanding of how Git tracks your code, manages changes, and helps you recover from mistakes confidently.&lt;/p&gt;

&lt;h2&gt;
  
  
  what's next
&lt;/h2&gt;

&lt;p&gt;In the next blog, we’ll go deeper into Git’s file structure and explore what happens under the hood when you run these commands. Understanding this will make Git feel less magical and more logical.&lt;/p&gt;

&lt;p&gt;If you found this blog helpful, do share it with others and feel free to drop your feedback. Your feedback helps me improve and write better content for you. &lt;/p&gt;

</description>
      <category>git</category>
      <category>webdev</category>
      <category>softwaredevelopment</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Why GIT Exists: The Pendrive Problem</title>
      <dc:creator>Abhishek Kumar</dc:creator>
      <pubDate>Sat, 31 Jan 2026 20:41:41 +0000</pubDate>
      <link>https://dev.to/iambhishek01/why-git-exists-the-pendrive-problem-4117</link>
      <guid>https://dev.to/iambhishek01/why-git-exists-the-pendrive-problem-4117</guid>
      <description>&lt;p&gt;If you are a developer, you must already be aware of Git and GitHub. But do you know &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;why Git was created? &lt;/li&gt;
&lt;li&gt;What problems existed before Git? &lt;/li&gt;
&lt;li&gt;And how was the world of coding managed before version control systems?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this article, you’ll find answers to all these questions.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Was the World of Coding Before Git?
&lt;/h2&gt;

&lt;p&gt;Let’s go back in time and imagine a world without Git.&lt;/p&gt;

&lt;p&gt;You are a developer working smoothly on a project. One day, you need help to develop a new feature, so you ask your developer friend, Rishi. Rishi agrees and asks for the code.&lt;/p&gt;

&lt;p&gt;To share the code, you zip the project, copy it to a pendrive, and hand it over to him. Rishi develops the feature, zips the updated code along with the existing code, and returns the pendrive to you.&lt;/p&gt;

&lt;p&gt;When you unzip the project, the first problem you notice is that there is a lot of code, and you have no idea which part was written by whom. Since the feature works fine, you ignore this issue and continue working with the updated code.&lt;/p&gt;

&lt;p&gt;A few days later, you discover a bug in the feature your friend wrote. You ask Rishi to fix it. Once again, you copy the entire project to the pendrive and give it to him. He fixes the bug, patches the code, and returns the pendrive.&lt;/p&gt;

&lt;p&gt;Now you know the code has changed — but you don’t know exactly what changed or where. To understand the modifications, you have to sit with your friend, discuss the changes line by line, and this takes time.&lt;/p&gt;

&lt;p&gt;Another major issue is conflicts and wasted time. Sometimes, while fixing a bug, some important code gets modified or removed without your knowledge. As a result, you may have to debug the entire project again.&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%2Fvm480stkwsyov6rnlmnt.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%2Fvm480stkwsyov6rnlmnt.png" alt="Pen drive problem" width="800" height="382"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Problems Faced Before Git
&lt;/h2&gt;

&lt;p&gt;By now, you can clearly see the problems developers faced:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Code Sharing:&lt;/strong&gt; Every time a feature needed to be developed or a bug needed fixing, the code had to be zipped and shared via a pendrive repeatedly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Difficult to Track Code Changes:&lt;/strong&gt; You had no visibility into what changes your friend made or which files were modified.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hard to Collaborate:&lt;/strong&gt; If multiple developers needed to work on the same project, tracking changes became almost impossible. Also, only one person could work at a time — the one who had the pendrive.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Thinking About a Solution
&lt;/h2&gt;

&lt;p&gt;Now let’s think about solving these problems.&lt;/p&gt;

&lt;p&gt;The first challenge is to track who made what changes. To solve this, imagine creating a software system that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tracks code changes
&lt;/li&gt;
&lt;li&gt;Stores the author of each change
&lt;/li&gt;
&lt;li&gt;Shows differences between old and new code
&lt;/li&gt;
&lt;li&gt;Maintains version history
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This solution would address the first two problems: tracking changes and identifying contributors.&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%2F2vw7y2ts074aes0l0kbk.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%2F2vw7y2ts074aes0l0kbk.png" alt="Birth of version control system" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;However, collaboration is still an issue. Only one developer can work at a time because the source code still exists in a single physical location.&lt;/p&gt;

&lt;p&gt;To solve this, you think of creating a single source of truth for the code. You purchase a server, install this code-tracking system on it, and upload your entire project there.&lt;/p&gt;

&lt;p&gt;Now, your friends can pull the code from the server, work independently, and push their changes back. Other developers can then pull the updated code from the same server.&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%2Fdn00gemb886364q8n487.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%2Fdn00gemb886364q8n487.png" alt="Git as a distributed system" width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is exactly what Git (the code-tracking system) and GitHub (the hosted server) do.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Birth of Git
&lt;/h2&gt;

&lt;p&gt;Git was created by Linus Torvalds to manage the Linux project. As Linux grew larger day by day, tracking changes became extremely difficult. To solve this problem, Linus developed Git — a distributed version control system (VCS).&lt;/p&gt;

&lt;h2&gt;
  
  
  Alternatives to Git
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;AWS CodeCommit
&lt;/li&gt;
&lt;li&gt;Apache Subversion
&lt;/li&gt;
&lt;li&gt;Unity Version Control
&lt;/li&gt;
&lt;li&gt;Fossil
&lt;/li&gt;
&lt;li&gt;Concurrent Versions System (CVS)
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Alternatives to GitHub
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Bitbucket
&lt;/li&gt;
&lt;li&gt;GitLab
&lt;/li&gt;
&lt;li&gt;Gitea
&lt;/li&gt;
&lt;li&gt;Codeberg
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This was all about why Git was needed — the problems developers faced before version control systems and how Git solved those challenges. Understanding this background makes it much easier to appreciate Git’s power and importance in modern software development.&lt;/p&gt;

&lt;p&gt;In the next article, we’ll dive into how Git actually works, explore its internal concepts, and take a closer look at the folder structure of the &lt;code&gt;.git&lt;/code&gt; directory to understand what happens behind the scenes.&lt;/p&gt;

</description>
      <category>git</category>
      <category>softwaredevelopment</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
