Use git HEAD as default branch


We're often changing git branch which git HEAD points to. Is there any way to setup git VCS default branch to be always a HEAD branch?


Hello Natalya,

Could you please describe your use case and workflow in more details? 


Hello Alina,

We're developing mobile games and using github as our VCS. Our programmers work on single branch (for example, v100) and git repo HEAD is pointing to it (this can be set via GitHub UI). When game update is released we merge v100 into v110 and switch HEAD to it. So HEAD always points to current working branch. But we need to change TeamCity VCS root settings to support new branch. Assuming that we always need only the latest branch which git HEAD points to is there anyway to configure VCS root to use git HEAD branch without need to specify it each time we merge old branch to a new one?


Hi Natalya,

No, the described functionality is not supported. Won't it be an option to configure branch specification to listen to all branches, e.g. +:refs/heads/*? If there are no commits and no builds on branch it will be consider as inactive and removed from UI.


Hi Alina,

How we can configure our schedule trigger to run only one branch?


Hi Natalya,

You can configure branch filter in the Scheduled trigger. In the latest TeamCity version it's on "Additional options" tab.


Please sign in to leave a comment.