关于分支

2017-05-04  本文已影响0人  酣醒

终端打开文件所在的目录
1.创建分支
输入 git checkout -b 分支名称 回车
git push origin 分支名称 回车
完成
2.切换分支
git branch 分支名称 回车
3.合并分支中的部分代码
假设有A分支和B分支
在B中提交了部分代码 并且push 到B分支中
然后我的A分支也想push刚才的那份代码 就可以
git cherry-pick commithash 回车
完成
说明: commithash是刚才B commit的hash值

上一篇 下一篇

猜你喜欢

热点阅读