3

Is there a way to display the most recent commits of each branch in git?

I have a codebase in git that I've set down for a while. There are several branches in it for different features. I need to go in and update/troubleshoot some code However I choose to name them too generically and now I can't tell which one I was working on last, or even which one had my feature in it.

Ideally I would like to see the last commit in each branch to get an overview of where I last left things. Is there a command to do this? I just need to see where I was working last. I want to avoid switching to each branch and looking at its log.

user151841
  • 17,377
  • 29
  • 109
  • 171

2 Answers2

5
git branch -v

will display the (short form of) the most recent commit's SHA1 in its second column and the description after that.

Fred Foo
  • 355,277
  • 75
  • 744
  • 836
1

git show <name_of_the_branch>

will display the most recent commit for the branch <name_of_the_branch>

ouah
  • 142,963
  • 15
  • 272
  • 331