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,596
  • 4
  • 31
  • 60

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,262,500
  • 529
  • 4,410
  • 5,250