Git Quick Notes

A compact reference for high-frequency Git commands.

Common Commands

1
2
3
4
5
git status
git add .
git commit -m "feat: add post"
git pull --rebase
git push

Branch Operations

1
2
3
git checkout -b feature/post
git switch main
git merge feature/post

Summary

  • Check git status before committing.
  • Prefer git pull --rebase to keep history clean.