2014-12-24 25 views
1

我有远程分支机构,如:推变化到一个特定的远程分支在Git中

$ git branch -r 
    origin/HEAD -> origin/development 
    origin/deploy-prod 
    origin/development 
    origin/master 

我签出产地/主为

$ git checkout -b trq17 origin/master 
$ git branch 
    development 
* trq17 

现在我想在trq17分支推变为远程产地/主。我怎样才能做到这一点?

回答

2

你想先合并它们,然后将结果推送到远程。这可以降低人们推送破碎的代码或有冲突的代码的可能性。

git checkout master 
git merge trq17 
git commit (if there was a merge commit or conflicts occurred) 
git push origin master