什麼只是沒有工作對我來說(GIT版本1.7.9.5,並使用HTTPS協議):
本來我分叉從 「帳戶」, 「foobar.git」 到 「我的賬戶」:
their_account/foobar.git => my_account/foobar.git
感興趣的分支是「巴茲」
我的工作和「巴茲」造提交他們這樣做了。我想合併他們的提交與我的。作爲ptomli上述建議的,我所做的:
$ git checkout baz
$ git fetch https://github.com/their_account/foobar.git baz
Username for 'https://github.com': my_account
Password for 'https://[email protected]':
remote: Counting objects: 189, done.
remote: Compressing objects: 100% (109/109), done.
remote: Total 189 (delta 92), reused 151 (delta 76)
Receiving objects: 100% (189/189), 107.77 KiB, done.
Resolving deltas: 100% (92/92), done.
From https://github.com/their_account/foobar
* branch baz -> FETCH_HEAD
,我沒有看到提到了步驟:
$ git merge FETCH_HEAD
和兩個分支合併。
可能重複[Git:在本地合併遠程分支](https://stackoverflow.com/questions/21651185/git-merge-a-remote-branch-locally) –