Files
30-seconds-of-code/snippets/git/s/create-fixup-commit.md
2023-05-07 16:07:29 +03:00

644 B

title, type, language, tags, author, cover, dateModified
title type language tags author cover dateModified
Create a fixup commit snippet git
commit
chalarangelo tools 2021-04-13T21:10:59+03:00

Creates a fixup commit that can be autosquashed in the next rebase.

  • Use git commit --fixup <commit> to create a fixup commit for the specified <commit>.
  • After running git rebase --autosquash, fixup commits will be automatically squashed into the commits they reference.
git commit --fixup <commit>
git add .
git commit --fixup 3050fc0de
# Created a fixup commit for `3050fc0de`
git rebase HEAD~5 --autosquash
# Now the fixup commit has been squashed