We have a script that actually does git fetch; git checkout origin/ to deploy a certain feature. The reason why we do this is that we wan\'t to avoid
git fetch; git checkout origin/
git symbolic-ref --short HEAD should tell you what branch you are on, or print an error if you are not on a branch.
git symbolic-ref --short HEAD