re: Easily auto-squash changes to previous commit VIEW POST


git commit also has a --no-edit flag that is very useful for --ammend. I have 3 aliases for --ammend in my .gitconfig:

    ca = commit --amend
    can = commit --amend --no-edit
    cana = commit --amend -a --no-edit

I hadn't noticed the no-edit flag. So basically in this case it would be like --amend -C HEAD. I like to use rebase alot, but indeed in this case amend would be simpler.

Code of Conduct Report abuse