Ho repository remoto. Sì:git rebase con conflitto non funziona
git clone https://[email protected]/mylogin/myrepo.git
Clona successo. I have git tree:
C (master)
| B: A
| /
B /
|
A
|
A0
|
A01 (origine/testa) (origine/master)
|
(alcuni commit)
ho bisogno:
B: A
C (master) /
Ho bisogno rebase ramo Da B a C (master) Cosa faccio:
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
Cosa devo fare? Posso passare al ramo b1, risolvere conflitti e commit, ma non aiuta (l'ho testato).
"non modificare il file come dovrebbe essere nel commit finale, piuttosto introdurre solo le modifiche desiderate per quel commit specifico" +1. Mi stavo chiedendo come mai queste righe di codice sono ancora lì, quando le ho cambiate! – Swapnil
Nota che dovresti modificare il file con il conflitto ('index1.txt' nel tuo caso), non il file' patch'. 'patch' è solo lì per fare riferimento se non si è sicuri di quale cambiamento venga ridefinito. –