git checkout using git gui

953 views
Skip to first unread message

ravishankar somasundaram

unread,
Jun 14, 2011, 2:31:28 PM6/14/11
to msysGit
Hello people,

I am trying to do a checkout with GIT Gui on my repository which has several commits and only one branch(default branch)

When select Branch->Checkout from GIT Gui, it shows only one option called master, and no other commits.

How to proceed ?

Konstantin Khomoutov

unread,
Jun 14, 2011, 4:53:27 PM6/14/11
to ravishankar somasundaram, msysGit

So what do you want to achieve? Check out one of the commits before the
master's tip commit?
Then in the checkout dialog, tick the "Revision expression" radio button
and enter something which `git rev-parse` is able to understand (say,
"HEAD^" or a first few digits from the commit's SHA-1 name etc).

P.S.
This has nothing to do with msysgit, such questions should be directed
to the git-users mailing list (on google groups as well).

ravishankar somasundaram

unread,
Jun 15, 2011, 1:29:40 AM6/15/11
to Konstantin Khomoutov, msysGit
Thanks for replying,

On Wed, Jun 15, 2011 at 2:23 AM, Konstantin Khomoutov <flat...@users.sourceforge.net> wrote:
On Wed, Jun 15, 2011 at 12:01:28AM +0530, ravishankar somasundaram wrote:

> I am trying to do a checkout with GIT Gui on my repository which has several
> commits and only one branch(default branch)
>
> When select Branch->Checkout from GIT Gui, it shows only one option called
> master, and no other commits.
>
> How to proceed ?
So what do you want to achieve?  Check out one of the commits before the
master's tip commit?

Basically i want to switch back to my previous commits view contents of files and return back to the latest commit.

in command mode its as simple as git log, note down the commit id, git checkout ___commitid___ and then git checkout master right, i want to perform the same here using gui

 
Then in the checkout dialog, tick the "Revision expression" radio button
and enter something which `git rev-parse` is able to understand (say,
"HEAD^" or a first few digits from the commit's SHA-1 name etc).


I achieved this by doing Ctrl+o to open the checkout window, Repository->visualize master repository and then note the sha id from gitk and then open checkout window and enter the id in the revision expression and then hit checkout.

Is this the procedure or are there any other shortcuts ?

 
P.S.
This has nothing to do with msysgit, such questions should be directed
to the git-users mailing list (on google groups as well).

Sorry, have joined that group. Will do that henceforth

Pat Thoyts

unread,
Jun 15, 2011, 5:38:27 AM6/15/11
to ravishankar somasundaram, Konstantin Khomoutov, msysGit
If you want to look over the history of your commits then on the
Git-gui Repository menu there are two menu items for visualizing
history. That launches gitk which can let you explore your past
commits as patches or let you look at the tree as it was for that
commit. You can also use that to checkout the tree for any previous
commit.
Reply all
Reply to author
Forward
0 new messages