2

After I do git pull, I want to see the revisions I just fetched in gitk. How can I do this? I know I can see what revisions to use in the output of git pull and I can give them as a parameter to gitk, but I want to do this automatically.

(Actually, I don't need to see all the fetched revisions, those from the current branch are sufficient.)

I use msysgit's git bash.

bstpierre
  • 30,042
  • 15
  • 70
  • 103
svick
  • 236,525
  • 50
  • 385
  • 514

2 Answers2

2

You can try a command similar to the ones used in "How can I see incoming commits in git?"

git fetch && gitk ..origin/master

, using the <rev> part of the "gitk [<option>…] [<revs>] [--] [<path>…]" syntax.

<revs>

Limit the revisions to show.
This can be either a single revision meaning show from the given revision and back, or it can be a range in the form "<from>..<to>" to show all revisions between <from> and back to <to>.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Hmm, that's a good idea, although I would extend that into `git fetch && gitk ..origin && git merge origin`. – svick Jul 12 '10 at 19:39
  • You lost 23 points in the rep recalc you requested. Sorry, I know that must be a crushing setback. ;) – Bill the Lizard Jul 12 '10 at 19:59
  • @Bill: I... I will somehow find it in me to go on and move forward. Thank you for your support in this difficult time ;) – VonC Jul 12 '10 at 20:16
2

Unless you have a really complicated tree there doesn't seem to be any reason not to use gitk --all &, then when you have done a git pull just select update or reload in the gitk menu.

Dipstick
  • 9,854
  • 2
  • 30
  • 30
  • If I did this, I wouldn't be able to distinguish new revisions from the old ones easily. – svick Jul 12 '10 at 19:33
  • 1
    Don’t use `git pull` then. Use `git fetch`, reload in `gitk`, run `git merge` manually. – Bombe Mar 15 '11 at 14:19