run git fetch before switching branch (#46196)
This commit is contained in:
parent
f2d6c89b8c
commit
f1028ba62b
|
@ -448,6 +448,7 @@ def setup_git_tree(project_reference, options):
|
|||
existing_tree = True
|
||||
branch_name = options.branch or get_git_branch_name(project_reference)
|
||||
try:
|
||||
subprocess.check_call(['git', 'fetch'], cwd=git_project_path)
|
||||
subprocess.check_call(['git', 'checkout', '--quiet', branch_name],
|
||||
cwd=git_project_path)
|
||||
subprocess.check_call(['git', 'reset', '--hard', 'origin/%s' % branch_name],
|
||||
|
|
Loading…
Reference in New Issue