工作的时候遇到,这里记录一下
假设当前分支为master,需要创建的分支是hello
1. 新建远程分支
1  | git checkout -b hello //在当前分支下创建hello的本地分支分支  | 
2. 把新建的本地分支push到远程服务器,远程分支与本地分支同名(当然可以随意起名)
1  | git push origin hello:hello  | 
3. 查看远程分支
1  | git branch -a //查看远程分支  | 
4. 修改本地文件后,推送到远程仓库
添加commit
1  | git commit -a  | 
将修改推送到远程分支
1  | git push origin hello:hello  |