私はリモートリポジトリを持っています。 私は:矛盾したgit rebaseは動作しません
git clone https://[email protected]/mylogin/myrepo.git
クローン成功。 私はgit treeを持っています:
C(master)
| B:A
| /
B /
|
A
|
A0
|
A01(原点/ヘッド)(原点/マスタ)
|
(一部のコミット)
私が必要:
B:
C(マスター) /
私はブランチをリベース必要B to 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
'patch'ファイルではなく、競合(あなたの場合は' index1.txt')を使ってファイルを編集する必要があることに注意してください。 'patch'は、どのような変更がリベースされているのか不明な場合に参照するためのものです。 –