2016-02-29 37 views

回答

0

您需要檢出所需的分支,然後將其合併到您的本地分支中。

# checkout the desired branch to which you want to merge the code into 
git checkout <main branch> 

# update the local repo with all the code from the remote 
git fetch --all --prune 

# merge side branch to the main branch 
git pull origin <main branch> 

# Merge the side branch 
git merge <side branch> 

Example:

git checkout master 
git fetch --all --prune 
git pull origin master 
git merge side_branch 
相關問題