DEV Community

Discussion on: A closer look at git rebase

Collapse
 
lt0mm profile image
Tom • • Edited


git commit --amend --no-edit

is also useful in such cases, which simply adds your changes to previous commit,


 tells git to leave previous commit message
Collapse
 
jandedobbeleer profile image
Jan De Dobbeleer •

Yup, but that only goes for the last commit whereas a fixup can blend into any commit after a rebase.

Thread Thread
 
lt0mm profile image
Tom •

Really neat, I didn't understand initially what it is

Thread Thread
 
jeklah profile image
Jeklah •

Very useful when you're using cli to commit with a message, but the commit message turns out too long so you shorten it, then can go to --amend --no-edit to extrapolate on the initial brief commit message. This is my most common use for this.

My second is forgetting to mention a change in a commit.