我有遠程存儲庫。 我這樣做:git rebase與衝突不起作用
git clone https://[email protected]/mylogin/myrepo.git
克隆成功。 我有git樹:
C(master)
| B:A
| /
B /
|
A
|
A0
|
A01(origin/head)(origin/master)
|
(一些提交)
我需要:
B:
C(主) /
我需要變基分支B到C(主) 我該怎麼做:
git checkout b1
Switched to branch 'b1'
git rebase master
First, rewinding head to replay your work on top of it...
Applying: B:A
Using index info to reconstruct a base tree...
M index1.txt
Falling back to patching base and 3-way merge...
Auto-merging index1.txt
CONFLICT (content): Merge conflict in index1.txt
Failed to merge in the changes.
Patch failed at 0001 B:A
The copy of the patch that failed is found in:
/pth/to dir/.git/rebase-apply/patch
When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
git branch
* (no branch)
b1
master
我該做什麼? 我可以在分支b1中切換,解決衝突並提交,但它沒有幫助(我測試了它)。
」不要編輯該文件,因爲它應該在您的最終提交中,而只是介紹爲特定提交所需的更改「+1。我想知道當我改變它們的時候,這些代碼行怎麼還在那裏? – Swapnil
請注意,您應該編輯帶有衝突的文件(在您的案例中爲'index1.txt'),而不是'patch'文件。如果您不確定哪些變更正在重新設計,那麼'patch'就在那裏。 –