1

Our host lets us deploy using git push, to any branch. It looks like a few extra branches have been pushed to the host by mistake. Before I remove all the extra branches, I would like to double check which branch contains the current state of our live code, i.e. which branch remote head is currently at.

I've tried git branch -rv --list, but that just lists remote branches without showing head. I tried git log production --all --decorate --oneline, but that is showing me the local "production" branch, not all branches on the "production" remote.

Dan Ross
  • 3,466
  • 2
  • 29
  • 57

1 Answers1

1

You can try:

git checkout production
git branch -r --contains HEAD

In order to list all remote branches referencing HEAD.

Community
  • 1
  • 1
VonC
  • 1,129,465
  • 480
  • 4,036
  • 4,755