pou*_*def 49 git github git-branch
我在github上有一个存储库,其他人已经分叉并进行了更改.
我想要:
我创建了新分支:
git commit -b my_new_branch
Run Code Online (Sandbox Code Playgroud)
如何将他们的代码合并到这个新分支?
这是我创建的分支:https://github.com/poundifdef/VirginMobileMinutesChecker/tree/widget_toast
这是我要合并的分支:https: //github.com/xbakesx/VirginMobileMinutesChecker
做这个的最好方式是什么?我尝试了"拉"但它不起作用.老实说,我不知道我在gitland做什么,所以如果有更好的方法来完成这个(除了我创建一个分支并尝试合并),那么我全都耳朵!
Ilk*_*kka 104
将他们的github fork repo作为远程添加到您自己的repo的克隆中:
git remote add other-guys-repo <url to other guys repo>
Run Code Online (Sandbox Code Playgroud)
获取他们的更改:
git fetch other-guys-repo
Run Code Online (Sandbox Code Playgroud)
签出要合并的分支:
git checkout my_new_branch
Run Code Online (Sandbox Code Playgroud)
合并他们的更改(假设他们在主分支上完成了他们的工作):
git merge other-guys-repo/master
Run Code Online (Sandbox Code Playgroud)
解决冲突,提出决议和瞧.
| 归档时间: |
|
| 查看次数: |
16783 次 |
| 最近记录: |