From: "Dirk Süsserott" <newsletter@dirk.my1.cc>
To: Pat Thoyts <patthoyts@users.sourceforge.net>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Gitk: shortcut to jump to the current HEAD (yellow spot)?
Date: Fri, 23 Dec 2011 19:54:56 +0100 [thread overview]
Message-ID: <4EF4CE80.8090502@dirk.my1.cc> (raw)
In-Reply-To: <874nwslayi.fsf@fox.patthoyts.tk>
Am 22.12.2011 19:26 schrieb Pat Thoyts:
> Dirk Süsserott <newsletter@dirk.my1.cc> writes:
>
>> Hi!
>>
>> Does anybody know about a shortcut in gitk to "jump to the yellow spot"?
>>
>> I often use cmdline and gitk at the same time, switch branches, stash,
>> rebase and so on from bash. When hitting [Ctrl-]F5 in gitk, the last
>> highlighted commit is focused again and my HEAD is far off the screen.
>>
>> Is there a way to jump to the HEAD (the yellow bubble in gitk) with a
>> fingertip?
>>
>> TIA
>> Dirk
>
> Hit the Home key. The binding for that takes you to the first commit.
> End to the last (oldest) commit.
Hi Pat,
thank you, but I almost always run gitk with the '--all' parameter.
Actually, I have a function in my .bashrc for this:
# calls gitk from the top-level directory:
function gkup()
{
(cd "./$(git rev-parse --show-cdup)"; gitk --all "$@" &)
}
That's because gitk behaves odd (at least to me) when not run from the
top-level directory. E.g. the "touching paths" box won't find files in
the top dir if you don't prefix them with a slash. It's all relative to
the directory gitk was started in. To get predictable behavior, I wrote
this function and garnished it with '--all'.
Thus, my current HEAD is not always on the top of the history but
somewhere in between. However, typing "HEAD" (or "head" in the SHA1
field works for me.
Cheers
Dirk
next prev parent reply other threads:[~2011-12-23 18:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-22 15:49 Gitk: shortcut to jump to the current HEAD (yellow spot)? Dirk Süsserott
2011-12-22 17:09 ` Martin von Zweigbergk
2011-12-22 17:23 ` Dirk Süsserott
2011-12-22 18:26 ` Pat Thoyts
2011-12-23 18:54 ` Dirk Süsserott [this message]
2011-12-24 4:22 ` Martin von Zweigbergk
2011-12-25 19:33 ` Dirk Süsserott
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=4EF4CE80.8090502@dirk.my1.cc \
--to=newsletter@dirk.my1.cc \
--cc=git@vger.kernel.org \
--cc=patthoyts@users.sourceforge.net \
/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;
as well as URLs for NNTP newsgroup(s).