git statu (查看仓库的状态)
git add <file>(向暂存区中添加文件)
git add .(是把本目录下所有文件添加到暂存区)
git rm --cached <file>(让文件从暂存区回退)
git commit m "注释" (提交到仓库)
git commit --amend
git log <file> (查看提交日志)
git diff <file>(查看提交前后的差异)
git branch (将仓库的所有分支都显示出来)
git checkout -b <branch>(直接创建分支并切换到新创建的分支)
可以拆分成 git branch <branch> 创建分支和git checkout <branch>切换分支
git merge 合并分支
git log -graph (以图形形式查看分支所有commit)
git reflog 查看当前仓库的操作日志
git reset 回溯历史版本
git remote add -- 添加远程仓库
git push 推送到远程仓库