初始化仓库: git init
添加暂存区: git add .
提交到本地仓库: git commit -m ‘注释‘
推送到远程仓库: git push 仓库地址 分支名称
拉取远程仓库代码: git pull
克隆仓库: git clone 仓库地址
创建分支: git branch 分支名称
切换分支: git checkout 分支名称
查看分支: git branch
合并分支: git merge 分支名称
查看日志: git log (git log --oneline)
查看所有日志: git reflog
版 本 回 退 : git reset --hard 版 本 号 (commit-id 可 以 通 过 git log --oneline 获取)