This page covers everything you need to know about Git & GitHub — from your very first git init to advanced recovery commands. Every command includes a real example and explains when and why to use it.
| Stage | Level | What You Learn |
|---|---|---|
| Stage 1 | 🟢 Beginner | Setup, init, clone, add, commit, push, pull |
| Stage 2 | 🟡 Intermediate | Branching, merging, pull requests, stash |
| Stage 3 | 🟠 Advanced | Rebase, cherry-pick, reset, revert, reflog |
| Stage 4 | 🔴 Expert | CI/CD hooks, submodules, signing commits, bisect |
When to use: Only once after installing Git on your machine.
git config --global user.name "Amrendra Bahubali"
git config --global user.email "[email protected]"
git config --global core.editor "code --wait" # sets VS Code as default editor
git config --list # verify all settings
When to use: Starting a brand-new project locally that has no Git history yet.
mkdir my-project
cd my-project
git init
This creates a hidden
.gitfolder — your project is now a Git repo.
When to use: When you want to download an existing GitHub repo to your machine.
git clone <https://github.com/Bahubali/my-project.git>
git clone <https://github.com/Bahubali/my-project.git> my-folder # clone into custom folder name
When to use: Before any commit, to see what's changed, staged, or untracked.
git status