Re: A new way to get a sha1?
- From
Jan Engelhardt <jengelh@inai.de>
- Date
- Jul 30, 2012, 12:28 UTC
- Message-ID
- <alpine.LNX.2.01.1207301426090.25013@frira.zrqbmnf.qr>
- In-Reply-To
- <jv5tln$96e$1@dough.gmane.org>
On Monday 2012-07-30 14:11, Thomas Badie wrote:
Show 8 quoted lines
>Hi all, > >When I should fixup or squash a commit, I nearly never >remember how to get the sha1 of the commit I want to fixup. >Because sometimes HEAD~n is not enough, I make `git log`, >copy the sha1 of the right commit and paste it in my git >fixup command. So I wrote a perl script to avoid the usage >of the mouse.
If you use screen(1), you can use the keyboard as well; it offers ^A [ and ^A ] for copy, and then paste. tmux and all those screen clones probably have something similar. Maybe ratpoison-like WMs do as well. Or, you can use `git log --oneline`, look for the commit and then type the (usually) 6-char part of the hash manually, which may be faster than ^A[, moving the cursor to the copy position, marking it, etc.
>So, what is your opinion?
IMO, I thus never needed an extra tool to find and specify the hash for `git re -i hash^`..
my ¥2