# Git for Beginners: What I Learned After Finally Using It

When I started learning coding, I kept hearing words like **Git**, **GitHub**, **commit**, and **branch** everywhere. At first, I honestly ignored them because they sounded confusing and advanced.

So this blog is just me trying to explain Git in **simple terms**, the way I understand it as a beginner.

## What is Git?

**Git is a version control system.**  
That sounds complicated, but here’s what it really means:  
Git helps you keep track of changes in your code.

Whenever you change your code, Git can remember:

1. What you changed
    
2. When you changed it
    
3. And lets you go back if something goes wrong
    

Git is also **distributed**, which means every developer has a full copy of the project on their own computer. You don’t need the internet all the time to use Git.

I like to think of Git as a history tracker for code.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1769783935381/f8d23ac2-a7b6-409b-a965-30befd61d4ec.png align="center")

## Why Git is Used

Before I used Git, my projects looked like this:

project/  
project-final/  
project-final2/  
project-final-really/  
  
It was messy and confusing.

Git solves this problem by:

Tracking every change automatically  
Letting you undo mistakes  
Helping multiple people work on the same project  
Making experimentation less scary

The best part?  
You’re not afraid of messing things anymore.  
Because you know Git has your back.

## Git Basics and Core Terminologies

When you start Git, you’ll see some common words again and again.

### Repository (Repo)

A **repository** is just a project that Git is tracking.

It contains:

* your code
    
* the history of all changes
    

Usually, one project = one repository.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1769783961237/2fd025f3-beef-4d1c-87e9-7b4f0cd5c0e1.png align="center")

### Commit

A **commit** is like saving your progress.

Whenever you commit, you’re saying:  
“This version of the code is important. Save it.”

Each commit also has a message explaining what you did.

**Example:**  
Fix Login bug  
Add homepage layout

### Branch

A **branch** lets you work on something new without breaking the main code.

You can:

* add new features
    
* fix bugs
    
* experiment freely
    

If it works, you can merge it later. If it doesn’t, no problem.

I think of branches like **trying things on a copy** of the project.

### HEAD

**HEAD** just tells Git where you are right now.

It points to the latest commit you’re working on.

As a beginner, you don’t really need to worry about it too much — Git handles it automatically.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1769783993263/9593c89a-654d-45e1-b0cf-6be5817b38e4.png align="center")

## Common Git Commands (The Ones I Actually Use)

Here are the commands I use almost every time.

git init: Starts Git in a project  
git status: This is the most helpful command ever.  
git add: This tells Git which changes you want to save.  
git commit: This actually saves the changes.  
git log: Shows all previous commits.
