Git tutorial — from BASIC to ADVANCED, explained step-by-step with real-world examples. No rush, no jargon overload.
git --version
git config --global user.name "Your Name" git config --global user.email "your@email.com"
git init
git status
Untracked → Staged → Committed
git add file.txt git add . # add everything
git commit -m "Initial commit"
git log
git log --oneline
node_modules/ .env vendor/
git remote add origin https://github.com/username/repo.git
git branch -M main git push -u origin main
git clone https://github.com/username/repo.git
git branch feature-login
git checkout feature-login
OR
git switch feature-login
git checkout -b feature-login
git checkout main git merge feature-login
git add . git commit -m "Resolved merge conflict"
git reset file.txt
git reset --soft HEAD~1
git checkout -- file.txt
git stash git stash pop
git rebase main
git cherry-pick commit_id
git revert commit_id
git tag v1.0 git push origin v1.0
git pull git checkout -b feature-api # code git add . git commit -m "API integration" git push origin feature-api