Git 速记清单

这是一份高频 Git 命令速查表。

常用命令

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

常用分支操作

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

小结

  • 提交前先检查 git status
  • 拉取优先 git pull --rebase,减少无用合并提交。
Author

Jiaru

Posted on

2026-03-01

Updated on

2026-03-01

Licensed under

Comments