[FIXED JENKINS-17150] avoid setting remote-repo/'HEAD' as a branch name for GIT_BRANCH