0

Is there a way to find what time a git checkout command was issued?

I did a git log but that is only showing me the commits. Not when I switched branches.

user2570937
  • 656
  • 2
  • 13
  • 29
  • Possible duplicate of [How to determine when a Git branch was created?](http://stackoverflow.com/questions/2255416/how-to-determine-when-a-git-branch-was-created) – uday May 03 '16 at 20:27
  • Switching between already-created branches doesn't really *do* anything, so you won't be able to find that out. – jonrsharpe May 03 '16 at 20:28
  • @jonrsharpe Information about when a checkout occurred is stored *somewhere*, to allow commands like `git show HEAD@{5.minutes.ago}` to work. – chepner May 03 '16 at 20:35
  • @chepner oh right, interesting! – jonrsharpe May 03 '16 at 20:36

1 Answers1

5

Take a look at the reflog:

git reflog --pretty

Actually, it appears that the time shown via reflog --pretty is the time of the commit, but this will get you what I think you're looking for:

git reflog --date=iso
alykhank
  • 423
  • 2
  • 6