I am trying to perform a full git fetch
from my build agent, in order to use GitVersion in TeamCity.
I have opted to use the agent checkout option in TeamCity, as per http://gitversion.readthedocs.io/en/latest/build-server-support/build-server/teamcity/#agent-checkout
However, when I perform a checkout on the agent, I'm unable to get the full git history for a branch. I get the same result as this: https://github.com/GitTools/GitVersion/issues/912 - Specifically:
System.InvalidOperationException: Could not find a 'develop' or 'master' branch, neither locally nor remotely.
My guess is this is because TeamCity is only checking out a subset of the repo history.
The Github issue has a workaround of performing a git fetch
command at the start of every build. Is this something that TeamCity can natively support as part of a VCS root?
Thanks in advance