Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
software:git [2016/01/28 22:02] cyril [Editing commits] |
software:git [2024/11/06 22:20] (current) cyril [Editing commits] |
||
---|---|---|---|
Line 180: | Line 180: | ||
< | < | ||
git rebase -i < | git rebase -i < | ||
- | # set "reword" if you want to change message | + | # set "r" |
- | # set "edit" if you want to amend the commit (git commit --amend; git rebase --continue) | + | # set "e" |
- | # set " | + | # set "s" (squash) if you want to merge with the previous commit and merging or editing the commit message |
+ | # set "f" (fixup) | ||
# you can even reorder the commits! | # you can even reorder the commits! | ||
</ | </ | ||
+ | Tips with '' | ||
+ | * If you have a bunch of fixup commits, first move them one by one (i.e. move one, apply, rebase again, move another one, apply, etc), so that if you prefer to abort due to conflicts you don't lose the ones before, and then really mark them " | ||
+ | * If you are just moving and merging some fixup commits, you may want to check that the end result is identical, by making a copy and then performing a diff. | ||
+ | * If you move a fixup commit up and keep getting conflicts after its initial position, it means that you made a mistake in the conflict resolution | ||
Change author or date: use '' | Change author or date: use '' |