1、查看本地分支 git branch
2、查看远端分支 git branch -a
3、删除本地分支 git branch -d 分支名
4、删除远端分支 git push origin --delete 分支名(remotes/origin/分支名)
5、基于远端分支origin/develop切本地分支develop git checkout -b develop origin/develop
6、切换到本地test分支 git checkout test
7、查看分支的远端跟踪关系 git branch -vv
8、查看本地改动 git show (按q退出查看 进入命令行)
9、本地修改的代码同步到远程
1)基于远程切分支 git checkout -b master_test origin/master
2)添加文件到git git add .
3)修改完以后 git commit -m "提交到master"
4)切到本地master分支 git checkout master
5)合并到本地的master分支 git merge master_test
5)提交到远程 git push origin master
10、git clone 下载代码
11、git fetch //clone完以后执行git fetch然后切分支