Re: [git-users] Why "commit --fixup" uses commit message instead SHA of original commit in resulting commit message?
On Wed, 1 Jul 2015 00:32:23 -0700 (PDT) Igor Deyashkin wrote: > Let i have these commits: > > * task #2850 > * task #2850 - #2961 > > Then i fixuping last commit: > git commit --fixup= > > * bfbfbfbf fixup! task #2850 > * task #2850 > * task #2850 - #2961 > > And I perform interactive rebase. Result will be: > > * p task #2850 > * f bfbfbfbf fixup! task #2850 > * p task #2850 - #2961 > > Fixup plased after wrong commit. Yes, this behavior is documentated: > git rebase -i --autosquash places fixup|squash commits after "a > commit whose title begins with the same …". (see rebase options > --autosquashdescription) > > But why commit --fixup make this? Why not use SHA in fixup commit > message like this? I don't know why "--fixup" behaves the way it does but when I need to create a fixup commit, I just commit as usually but make my message single line reading "fixup! bbb". Then at rebase stage it works as expected. To be honest, I did even not know about the "--fixup" command-line option of `git commit` ;-) -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[git-users] Why "commit --fixup" uses commit message instead SHA of original commit in resulting commit message?
Let i have these commits: * task #2850 * task #2850 - #2961 Then i fixuping last commit: git commit --fixup= * bfbfbfbf fixup! task #2850 * task #2850 * task #2850 - #2961 And I perform interactive rebase. Result will be: * p task #2850 * f bfbfbfbf fixup! task #2850 * p task #2850 - #2961 Fixup plased after wrong commit. Yes, this behavior is documentated: git rebase -i --autosquash places fixup|squash commits after "a commit whose title begins with the same …". (see rebase options --autosquashdescription) But why commit --fixup make this? Why not use SHA in fixup commit message like this? git commit --fixup= * bfbfbfbf fixup! * task #2850 * task #2850 - #2961 And I perform interactive rebase. Result will be: * f bfbfbfbf fixup! * p task #2850 * p task #2850 - #2961 And it is what i expect. So, using commit message by default in creating fixup commits is trustless. May be there is an option to use SHAs instead commit messages? I dont found it. Thanks. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.