查看分支
git branch
查看远程分支
git branch -f
查看所有分支
git branch -a
本地创建新分支
git branch [branch name]
切换分支
git checkout [branch name]
创建+切换分支
git checkout -b [branch name]
将新分支推送到远程
git push origin [branch name]
删除本地分支
git branch -d [branch name]
删除远程分支
git push origin :[branch name]
添加本地需要提交代码
git add .
提交本地代码
git commit -m "这里提交备注"
将代码推送
git push origin [branch name]
git合并某个分支
git merge [branch name]
//合并后推送到远程
git push
使用某个储藏
git stash apply <储藏的信息>
//使用某个n的那个
git stash apply stash@{n}
删除储藏
//删除某个特定储藏
git stash drop stash@{n}
//删除所有储藏
git stash clear
代码回滚
git reset --hard "这里是版本"