Noel
Noel

Reputation: 145

TortoiseGit show log for remote branch

I am new to Git and bitbucket so excuse me if this is a very simple question.

I am using bitbucket in conjunction with TortoiseGit and I've set it up according to:

http://guganeshan.com/blog/setting-up-git-and-tortoisegit-with-bitbucket-step-by-step.html

and it is all working correctly.

What I would like to do is that when I click on show log from tortoiseGit I see the log of the remote branch ( hosted on bitbucket ) not that of the local branch

I managed to see the remote's branch log by doing:

git fetch
git log remote/test

from gitbash ( https://github.com/abhikp/git-test/wiki/View-the-commit-log-of-a-remote-branch )

Is there any way I can accomplish the same task from within tortoiseGit?

Upvotes: 7

Views: 9688

Answers (2)

Nam San
Nam San

Reputation: 1245

The accepted answer shows all commits on all branches which isn't quite what was asked, and often shows too much information to understand. You can do the following to view just a single remote branch instead.

  • Perform "git fetch" as usual either from the TortoiseGit or from the command line.

  • In the "Log Messages" dialog, click on the blue branch name in the top left corner to open the "Browse references" dialog Click on the blue branch name

  • In the "Browse references" dialog select the remote branch you want to view, it will most likely be under refs->remotes->origin. Then click on the "OK" button to return to your "Log Messages" dialog. The commit history should now show the details of the remote branch that you selected.

Select the remote branch of interest to you

Upvotes: 6

VonC
VonC

Reputation: 1323593

You can emulate those steps in TortoiseGit:

  • git fetch origin:

https://raw.githubusercontent.com/TortoiseGit/TortoiseGit/master/doc/images/en/Fetch.png

  • git log origin/test:

In the log dialog box, select "All branches", to see the remotes/origin/test

http://dev.opencascade.org/doc/overview/html/OCCT_GitGuide_V2_image026.png

you can see other illustrations in the dev guide.

Upvotes: 9

Related Questions