git rebase - what's the difference between 'edit' and 'reword'
What's the difference between edit
and reword
when you do a git rebase?
I'm going through some docs which say this:
Replace pick with:
- edit to mark a commit for amending.
- reword to change the log message.
- "reword" allows you to change ONLY the commit message, NOT the commit contents
- "edit" allows you to change BOTH commit contents AND commit message (the mechanism by which git allows you to edit the commit contents is by "pausing" the rebase; so you can amend the commit)
reference : The git-rebase documentation says this:
- edit : By replacing the command "pick" with the command "edit", you can tell git rebase to stop after applying that commit, so that you can edit the files and/or the commit message, amend the commit, and continue rebasing.
- reword : If you just want to edit the commit message for a commit, replace the command "pick" with the command "reword".
edit
will pause the rebase entirely, allowing you to change files in the commit and/or the commit message.
reword
will simply open an editor to let you change the commit message only.