We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 59738a1 + fcc725c commit b9aff0cCopy full SHA for b9aff0c
readthedocs/vcs_support/backends/git.py
@@ -148,8 +148,10 @@ def use_shallow_clone(self):
148
return not self.project.has_feature(Feature.DONT_SHALLOW_CLONE)
149
150
def fetch(self):
151
+ # --force lets us checkout branches that are not fast-forwarded
152
+ # https://github.com/readthedocs/readthedocs.org/issues/6097
153
cmd = ['git', 'fetch', 'origin',
- '--tags', '--prune', '--prune-tags']
154
+ '--force', '--tags', '--prune', '--prune-tags']
155
156
if self.use_shallow_clone():
157
cmd.extend(['--depth', str(self.repo_depth)])
0 commit comments