在git命令行中使用BUILDKITE_GIT_CLONE_FLAGS参数手动进行clone。例如:
git clone -b my-branch https://github.com/my-org/my-repo.git --depth=50 --no-single-branch
其中,BUILDKITE_GIT_CLONE_FLAGS参数可以设置为--depth=50 --no-single-branch
,即使得clone深度最多只有50个commits,同时把所有remote branch都clone下来。