From: <rsbecker@nexbridge.com>
To: "'Martin Imre'" <martinimre25@gmail.com>, <git@vger.kernel.org>
Subject: RE: Feature Request: Interactively pick fixup revision
Date: Sat, 9 Nov 2024 08:09:14 -0500 [thread overview]
Message-ID: <03c201db32a8$96e66e20$c4b34a60$@nexbridge.com> (raw)
In-Reply-To: <CABg7He2asYQbdRvSvfh1YZ2FRPchVfvta8yBv4PFdVNnhzX6Ow@mail.gmail.com>
On November 9, 2024 6:41 AM, Martin Imre wrote:
>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.
You might find that git rebase --autosquash -i <commit> might do what
you are looking for. This allows you to clean up your topic branch prior
to creating a pull request. Loads of documentation online about its use.
Good luck,
Randall
next prev parent reply other threads:[~2024-11-09 13:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-09 11:41 Feature Request: Interactively pick fixup revision Martin Imre
2024-11-09 13:09 ` rsbecker [this message]
2024-11-09 13:39 ` Martin Imre
2024-11-09 14:55 ` Matěj Cepl
2024-11-09 17:13 ` Kristoffer Haugsbakk
2024-11-09 19:43 ` Matěj Cepl
2024-11-10 7:55 ` Martin Imre
2024-11-10 7:59 ` Kristoffer Haugsbakk
2024-11-10 16:09 ` Stefan Haller
2024-11-11 2:53 ` Matěj Cepl
2024-11-16 17:39 ` Oswald Buddenhagen
2024-11-09 17:08 ` Kristoffer Haugsbakk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='03c201db32a8$96e66e20$c4b34a60$@nexbridge.com' \
--to=rsbecker@nexbridge.com \
--cc=git@vger.kernel.org \
--cc=martinimre25@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.