1 Replies Last post: Sep 27, 2013 8:57 PM by Dmitry Neverov  
Michael Knapp Newbie 15 posts since
Aug 19, 2013
Currently Being Moderated

Sep 13, 2013 8:28 PM

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 http://confluence.jetbrains.com/display/TCD8/Git+(JetBrains) ), 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 http://stackoverflow.com/questions/1778088/how-to-clone-a-single-branch-in-git


Is there a way to achieve this in TeamCity?

Dmitry Neverov JetBrains 354 posts since
Mar 29, 2010
Currently Being Moderated
Sep 27, 2013 8:57 PM in response to: Michael Knapp
Re: Limit Git VCS root to one branch?

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.

More Like This

  • Retrieving data ...