https://blog.youkuaiyun.com/u011280600/article/details/80744818
GitHub创建分支两种方式
https://blog.youkuaiyun.com/hcjsjqjssm/article/details/84558229
通过git命令行从github上下载指定branch的项目源码
不下载主线代码,只下载支线代码。
输入命令:git clone -b 分支名 git地址
例如:主线是hydro-devel,我们想下载indigo-devel版本,命令如下:
git clone -b indigo-devel https://github.com/AaronMR/Learning_ROS_for_Robotics_Programming_2nd_edition.git
在github上创建新的分支(包括管理分支)
https://www.cnblogs.com/juncaoit/p/9349374.html
相关命令:
git init
git remote add origin git@github.com:mimi-glomax/test.git
git push origin new-branch
git fetch origin mimi01
git checkout origin/mimi01
git clone -b web git@github.com:hippo-hk/glomax_deploy.git
删除本地分支:
git branch -D delete-branch
删除远程分支 :
git push origin –delete 分支名
master分支上执行:
git checkout -b branchname
将新分支推送至GitHub:
git push origin branchname
删除不需要的文件后,更新到github:
git add .
git commit -m ""
git push -u origin branchname
后面服务器上直接拉取对应程序的分支即可:
git clone -b web git@github.com:hippo-hk/glomax_deploy.git