As I illustrated in the section " Trimming Git Commits / Squashing Git History " and summarizing:
with the fix! you could keep this message “invisible” in the commit message while retaining the ability to automatically forward the commit using the option--autosquash
As Op Dash comment :
Use squash!ensures that a crush operation is recorded in the history, which is different from fixup!where the squash operation is invisible for a cleaner approach.
Another difference before Git 2.16.x / 2.17 (Q1 2018) is that you could not combine the " git commit --fixup" with the extra commit message.
This is no longer the case.
. 30884c9 (22 2017 .) Ævar Arnfjörð Bjarmason (avar).
: (sunshineco).
( Ævar Arnfjörð Bjarmason - avar - 30884c9, 22 2017 .
commit: --fixup <commit> -m"<extra message>"
-m --fixup.
( " -m " ) , --fixup.
--edit .
:
--fixup commit, , .
(Ab), --fixup, , , -,
.. "this should have been part of that other commit", - , .
,
"forgot this part, which broke XYZ".
, Git 2.17 (Q2 2018) "git commit --fixup" "-m<message>" ; .
. 30884c9, f55e84f ( 22 2017 .) Ævar Arnfjörð Bjarmason (avar).
: (sunshineco).
( - gitster - c1ab3b8, 27 2018 .
commit: --fixup <commit> -m"<extra message>"
-m --fixup. --fixup. --edit .
:
--fixup commit, , .
(Ab), --fixup, , , , .. , " ", - , .
, " , XYZ".
--fixup <commit> -m"More" -m"Details" :
!fixup <subject of <commit>>
More
Details
--fixup , -m " -c, -c -F, --fixup ( commit d71b8ba," commit: --fixup rebase --autosquash ", 2010-11-02, Git 1.7.4-rc0)).