Use git HEAD as default branch

Answered

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?

5 comments
Comment actions Permalink

Hello Natalya,

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

0
Comment actions Permalink

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?

0
Comment actions Permalink

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.

0
Comment actions Permalink

Hi Alina,

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

0
Comment actions Permalink

Hi Natalya,

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

0

Please sign in to leave a comment.