附录B:Git常用命令速查
命令 意思
git init 初始化仓库
git clone 克隆远程仓库
git add 暂存更改
git commit 提交更改
git push 推送到远程
git pull 拉取并合并远程更改
git fetch 拉取远程更改不合并
git merge 合并分支
git rebase 变基
git branch 管理分支
git checkout 切换分支
git switch 切换分支(新命令)
git status 查看状态
git log 查看历史
git diff 查看差异
git stash 暂存工作进度
git tag 管理标签
git reset 重置分支
git revert 撤销提交
git cherry-pick 选择性合并
git remote 管理远程