Back to writing
March 9, 2026
Git Basics: git init, git add, and git commit Explained
Git Basics: git init, git add, and git commit Explained
Git is a powerful version control system used by developers to track code changes, collaborate with teams, and maintain project history. Platforms like GitHub, GitLab, and Bitbucket use Git to manage repositories.
In this blog, we will learn three fundamental Git commands every developer should know: git init, git add, and git commit.
1. git init – Initialize a Git Repository
The git init command is used to create a new Git repository inside your project folder. It prepares the directory so Git can start tracking file changes.
Command
git init