【发布时间】:2012-01-21 00:49:39
【问题描述】:
我只是在尝试开发新功能 A,但想跟上来自 origin/master 的任何提交。下面的工作吗?这是最好的方法吗?
git clone ssh://xxx/repo
git branch --track featureA origin/master
[do work on featureA and commit]
git commit -m"all changes made in featureA"
git push
日常工作:
git pull (pull the latest from origin/master)
[merge the new commits coming from origin/master with my local featureA changes]
git commit -m"resolved conflicts"
git push origin/featureA
当时间准备好将 featureA 合并到 master 时:
git checkout master
git merge featureA
git push origin/master
听起来对吗?
【问题讨论】: