top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

GIT: How can I get a list of checkout history?

+2 votes
272 views

As you know, I can checkout the Nth checked out branch via this syntax:

$ git checkout @{-N}

Is there a built-in mechanism to get a listing of previously checked out refs? Basically, this would be similar to 'history' command in linux where instead of actual commands, it lists like this:

HEAD@{-1}: master
HEAD@{-2}: topic1
HEAD@{-3}: 3f346e9 (detached)

Seems like reflog should be able to do this, and maybe it can, but I'm not sure. Any tips? I'd be fine making a convenient alias for this if it ends up being a series of piped commands.

posted Feb 15, 2016 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+1 vote

I did commit for so many times. So how can go to a particular commit code, or previous version of my code.

0 votes

I want to retrieve the commit history of a given file.What command should I issue? I expect the command like below.

D:GitTest> git show --commit-history test.txt
8194aaa
c419234
...
+3 votes

My company is upgrading the laptops and so, they're selling the old ones. The problem is, we've been using the old laptops to access remote git repos and the employer would like to clean all possible traces of repo URLs that have been accessed in these laptops. How do I do this? We used Git Bash and Conemu. Will uninstalling Git Bash and Conemu be enough to delete all repo URL history in the laptops? or are these repo URL never been saved to local disk in the first place?

+2 votes

In our current setup, we have automatic tagging in git of all successful release builds. This makes it easy to go back to stable points in history and compare functionality, check when bugs were introduced etc.

To help with this process further, it would be useful to be able to use git bisect, but as these are just a sequence of tags, not commits on a branch, git bisect will not work as is.

Is there any tooling for automatically recreating a branch from a sequence of tags, where each generated commit is the calculated delta between each two neighboring tags?

...