2012/7/30 Jan Engelhardt <jeng...@inai.de>:
> On Monday 2012-07-30 14:11, Thomas Badie wrote:
>>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
I understand your opinion. My solution was a easier way to make your
proposition about `git log --oneline`, because I don't want to copy these
6 numbers by hand. I'd prefer select the right line simply.
My solution is intended for people who just use git, and whatever their
environment (Unix, Windows...) because all is contained in git.
But I clearly agree that there is a lot of other solutions by using external
tools. But IMHO, it is preferable that I just have to add a `-i' to a command
to make this choice simply, and not having to use my WM for this kind of task.
My real proposal is to integrate this way of choice into git instead of having
to use external tools, or writting the part of the sha1 by hand.
Thanks for answering, your answer confirms that this kind of tools is really
not wanted by everyone.
I will take a look at screen, it can be useful for a lot of thing. Thanks for
Thomas "Enki" Badie
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html