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
  • 16,399
  • 28
  • 105
  • 164

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
  • 342,876
  • 71
  • 713
  • 819
1

git show <name_of_the_branch>

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

ouah
  • 138,975
  • 15
  • 262
  • 325