Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove "fixup!" message from `git commit --fixup HEAD`

Tags:

git

I often use git rebase -i HEAD~N to squash/fixup all my interm commits, or the one I just did, into the former before pushing upstream.

I learned about git commit --fixup HEAD which helps me avoid a number of keystrokes.

The issue is it adds "fixup!" to the previous commit message, any way to make it stop doing that?

like image 513
sjakubowski Avatar asked Aug 17 '26 22:08

sjakubowski


1 Answers

If you just want to add the current staged changes to the last commit you probably should use

git commit --amend --no-edit

with the --no-edit git does not prompt for a new commit message.

As @phd said, fixup is ment to be used with rebase -i --autosquash

like image 91
Francesco Avatar answered Aug 21 '26 00:08

Francesco