Treating 'master' and 'refs/heads/master' as the same branch in TeamCity

Working with github and teamcity, builds seem to either be refs/heads/master or master branch.

Whenever the github service hook launches a build, it is on the branch master.

  • git: How to delete a local ref branch?
  • How to “clone” branch as one commit?
  • Git remove history commit
  • How to setup SVN repository in XCode?
  • ssh-keygen' is not recognized as an internal or external command
  • Does Git warn me if a shorthand commit ID can refer to 2 different commits?
  • Whenever TeamCity launches a build (e.g. when I start a build, or a dependency building triggers a build) the branch is refs/heads/master.

    This causes two build numbers to be shown on the same page, the last build for master and the last build for refs/heads/master.

    Is there a way to make TeamCity triggered builds build master instead of refs/heads/master?

    Or is there a way to get master and refs/heads/master to be treated as the same branch, not as different ones?

  • What to do with commit made in a detached head
  • Making vim show a git diff with colors like a git diff command (red-delete, green-add)
  • Recover uncommitted changes after a mistaken merge
  • Sprockets::CircularDependencyError application.js has already been required
  • How to perform a rebase onto a specific commit?
  • Error pushing project to existing repo-> Permission denied (publickey) - fatal: Could not read from remote repository
  • One Solution collect form web for “Treating 'master' and 'refs/heads/master' as the same branch in TeamCity”

    I think I found a solution to this, though it isn’t ideal because I had to delete all passed builds.

    I had to first copy the projects and delete the old ones to get rid of all builds that had been run.

    Then I configured the default branch to be master. And I set the other branch specifications to:


    Also, I updated the VSC trigger to listen on +:master instead of +:*.

    Then I tested by manually triggering a build, and having github test hook trigger a build. It seem to have worked, they are both grouped under master!

    Git Baby is a git and github fan, let's start git clone.