Limit Git VCS root to one branch?

Is it possible for Git VCS branches to limit the git fetch/pull operations to a particular branch? This would limit the overall traffic and time consumption when fetching data from a remote Git repository.

I know we can do shallow clones using teamcity.git.use.shallow.clone (see ), and git fetch and git clone itself support only grabbing data for a particular branch (in our case we want master, but not any feature branches), e.g. see

Is there a way to achieve this in TeamCity?

1 comment
Comment actions Permalink

Hi Michael,

actually TeamCity does clone only branch required for the build. Do you see it doesn't? BTW, yet another option for limiting traffic is the use of local mirrors on the agent. With them TeamCity doesn't need to clone whole repository to do clean checkout.


Please sign in to leave a comment.