Re: How to implement the "amend!" commit ?
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Jan 14, 2021, 17:32 UTC
- Message-ID
- <YACAHdDEMIgvQruK@nand.local>
- In-Reply-To
- <99b40665-45dd-6c4d-d46a-56c7dbf89568@gmail.com>
On Thu, Jan 14, 2021 at 10:39:50AM +0000, Phillip Wood wrote:
Show 7 quoted lines
> > Secondly, As an alternative to above, we can use `--fixup=<commit> > > --amend` and `--fixup=<commit> --reword`. > > This is not backwards compatible. At the moment If you create a fixup with > `git commit --fixup=aaa` and then realize it should refer to commit bbb > instead you can fix it with `git commit --amend --fixup=bbb`. That would no > longer be possible.
Too bad. I felt that this was the most ergonomic idea put forwards, but I also thought that we died with '--amend --fixup=xxx'. Its current behavior does make sense to me, but it's too bad that we can't use it for this new purpose.
I suppose the first option (the '--fixup=reword:xxx' one really is the only one that can be implemented while preserving backwards compatibility, so I think we have no choice but to go with that one.)
Thanks, Taylor