diff --git a/source_control/git b/source_control/git index a7417bf6934..20e204c6adc 100644 --- a/source_control/git +++ b/source_control/git @@ -271,6 +271,7 @@ def switch_version(git_path, module, dest, remote, version): cmd = "%s reset --hard %s/%s" % (git_path, remote, version) else: cmd = "%s checkout --force %s" % (git_path, version) + branch = version else: branch = get_head_branch(git_path, module, dest, remote) (rc, out, err) = module.run_command("%s checkout --force %s" % (git_path, branch))