
What is “Git” .
Git is a version control system that tracks every change in the code. It keeps a history of what changes are made in the codebase.
Git stores a copy of your code that it is tracking on your system. Whenever you make any change in your code files, Git knows exactly what you changed because it already has your old code saved.
Git helps you remember:
What code you wrote today.
Which feature you worked on yesterday.
What changes you have made so far on your system.
Because Git keeps a history.
Not only this, if many developers are working on the same project, Git tracks everyone’s code. It shows which developer wrote which code and on which line.
Git is just a tool and software that works in the background. You only need to use Git commands.
Why “Git” is used .
The only reason we use Git is to track the code.
Take one example: if you do not use Git, how will you track your code, and how will you know who changed the codebase when more than one developer is working on the same project ?
And without Git, developers cannot track or write their code simultaneously while working on the same codebase.
You can use Git on your local system to track your own changes.
Example :-
If you are working on a large project where 2–3 developers are working on the same codebase, Git is used to track every developer’s code line by line. The benefit of this is that all developers know which developer added code to which line and what they did or did not do.
Git Basics and Core Terminologies .
Now we understand that Git is used to track code.
Let’s understand where developers store code so others can work on it together.
When multiple developers work on the same project, they need a common place to store the code publicly. One developer can push their code, and other developers can pull that code, add their own changes, and push it back.
To solve this problem, a central server was created. All developers connected to the same project can push their code to this server. Other developers can see the changes, pull the code, update it, and push it again.
This server is called GitHub.

GitHub is a place where developers store their code online. It acts like a server.
Developers use Git commands to push code to GitHub, pull code from it, and manage all changes in the project.
Git Commands .
There are many useful and important commands in Git.
Each command has a different purpose and is used for a specific use case. Below are list of git important - important commands .
## Common Git Commands 1. **`git status`** – Shows the current state of your working directory and staged files. 2. **`git init`** – Creates a new Git repository and initialize in the current folder. 3. **`git add`** – Adds files to the staging area before committing. 4. **`git commit -m ""`** – Saves the staged changes with a message. 5. **`git log`** – Displays the history of commits in the repository. 6. **`git revert <hash>`** – Creates a new commit that undoes changes from a specific commit. 7. **`git reset --hard <hash>`** – Moves the project back to a specific commit and deletes later changes. 8. **`git branch`** – Lists all branches in the repository. 9. **`git diff`** – Shows changes between working files and staged or committed files. 10. **`git diff <hash> <hash>`** – Compares changes between two specific commits.💡This repository contains basic information about Git, including why we use Git, its core terminology, and some useful Git commands for daily development work.




