Feature Request: Interactively pick fixup revision
- From
- Martin Imre <martinimre25@gmail.com>
- Date
- Nov 9, 2024, 11:41 UTC
- Message-ID
- <CABg7He2asYQbdRvSvfh1YZ2FRPchVfvta8yBv4PFdVNnhzX6Ow@mail.gmail.com>
Hi,
first email to this list, so please forgive me if I'm doing something wrong.
My usual workflow is using `git commit --fixup <revision>` quite frequently, as it eases the code reviewing process and allows for a clean history later on.
One thing that is always cumbersome is to first find the SHA of the revision that I plan to commit a fixup to. I usually use git log and then copy the revision. I even wrote a script that eases this process using fzf: ``` #!/bin/bash
res=$(git log --oneline | fzf) ref=$(echo $res | cut -d ' ' -f1)
git commit --fixup ${ref} ```
I don't think fzf is really necessary here, but it speeds things up.
Anyhow, I'm really surprised that this isn't a feature of git. I could see a `git commit --fixup` (without a revision) or `git commit --fixup --interactive` open up the git log and let one pick the revision they want to commit a fixup to.
Cheers, Martin