-
Notifications
You must be signed in to change notification settings - Fork 1
usage
fraschfn edited this page Aug 2, 2012
·
2 revisions
-
add a file 1.txt with lines 1-10
-
commit
-
create two branches branchTarget and branchSource
-
switch to branchTarget
-
rename file 1.txt to 2.txt
optionally: edit line 1
-
commit
-
checkout branchSource
-
edit line 5
-
commit
-
edit line 8
-
commit
-
add branch branchSourceTemp on branchSource
-
git rebase branchTarget branchSourceTemp
alternatively if not only a rename but also changes occurred:
git rebase --strategy="recursive" --strategy-option="rename-threshold=25" branchTarget branchSourceTemp
-
git rebase --onto branchTarget branchSourceTemp~ branchSourceTemp
in branchSourceTemp the file 2.txt contains only the modification of line 8 (and the optionally change on line 1)