From: kostix@bswap.ru
To: git@vger.kernel.org
Cc: wuzhouhui <wuzhouhui14@mails.ucas.ac.cn>
Subject: Re: How to display "HEAD~*" in "git log"
Date: Wed, 6 Jul 2022 15:38:11 +0300 [thread overview]
Message-ID: <20220706123811.dwbuinnbtxftorae@carbon> (raw)
In-Reply-To: <a1e53e52-cb08-bbff-f58a-391932707fb7@mails.ucas.ac.cn>
By the way, you can consider "going more interactive" with the approach which
involves scripting. For instance, you can use any of the "fuzzy finders"
such as the venerable fzf [1] to interactively select a commit to rebase -
something like
$ git log --oneline -50 | fzf | cut -d ' ' -f 1
would produce the log of the last 50 commits, allow you to interactively
select a commit of interest by typing some of the characters of its message
and/or hash and then print the selected hash.
This can be easily combined with rebasing: for instance, if you have the above
encantation available as an alias named "select" or a custom script named
"git-select", you could do
$ git rebase -i $(git select)~
to not even copy or memorize anyting.
I, for one, routinely use fzf to pick a branch for checkout.
1. https://github.com/junegunn/fzf
next prev parent reply other threads:[~2022-07-06 12:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-05 7:11 How to display "HEAD~*" in "git log" wuzhouhui
2022-07-05 9:25 ` Konstantin Khomoutov
2022-07-05 9:30 ` Konstantin Khomoutov
2022-07-05 9:36 ` wuzhouhui
2022-07-06 12:38 ` kostix [this message]
2022-07-06 14:38 ` Jeff King
2022-07-06 16:28 ` Konstantin Khomoutov
2022-07-06 16:49 ` Jeff King
2022-07-06 18:21 ` Konstantin Khomoutov
2022-07-07 17:06 ` Jeff King
2022-07-06 17:31 ` Junio C Hamano
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=20220706123811.dwbuinnbtxftorae@carbon \
--to=kostix@bswap.ru \
--cc=git@vger.kernel.org \
--cc=wuzhouhui14@mails.ucas.ac.cn \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox