Re: How to display "HEAD~*" in "git log"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux