Dan Ross
Dan Ross

Reputation: 3691

How to find out which remote branch remote HEAD points to?

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.

Upvotes: 1

Views: 113

Answers (1)

VonC
VonC

Reputation: 1323135

You can try:

git checkout production
git branch -r --contains HEAD

In order to list all remote branches referencing HEAD.

Upvotes: 1

Related Questions