查看分支:git branch
创建分支:git branch <name>
切换分支:git checkout <name>
创建+切换分支:git checkout -b <name>
合并某分支到当前分支:git merge <name>
删除分支:git branch -d <name>
将远程仓库的代码clone:git clone [url]
修改完代码后提交到暂存区(要使用status查看工作盘是不是干净的喔):git add
将暂存区的代码提交到本地仓库:git commit -m “commit注释”
撤销上次commit:git reset --soft HEAD~
查看用户名:git config user.name
查看邮箱地址:git config user.email
修改全局用户名:git config --global user.name “username”
修改邮箱地址:git config --global user.email “email”