Queue build for non-default branch with git and VS

build, git, tfs, tfsbuild, visual-studio-2013

Solution

On the Parameters tab there is a "Checkout Override" where you can override exactly which branch to use for the build. There is no nice UI/Picker for the field, but you should be able to set the branch/commit to build right there.

There is a pretty simple editor in this post to select the available tags.

Problem

I'm using Visual Studio's integration with git. I modified the build definition's Source Settings to monitor all git branches (`refs/heads/*`). This works perfectly for automatically triggered builds. When I manually queue a new build from within Visual Studio, the only option is to queue the default build (e.g. if I default to `refs/heads/develop`, I can't queue `refs/heads/mybranch`). The workaround is to change the default temporarily in the build definition. Is there another way? Somehow to pass a parameter perhaps?

Original source

Related problems