Use git reset --hard for checkout
This commit is contained in:
parent
9544954ab7
commit
be09c4afaf
|
@ -31,8 +31,8 @@ def build_peach_config(default_branch=True):
|
||||||
cwd=service_path).decode(sys.stdout.encoding)
|
cwd=service_path).decode(sys.stdout.encoding)
|
||||||
branch = default_branch.replace('origin/', '').strip()
|
branch = default_branch.replace('origin/', '').strip()
|
||||||
subprocess.check_call(["git", "checkout", branch], cwd=service_path)
|
subprocess.check_call(["git", "checkout", branch], cwd=service_path)
|
||||||
subprocess.check_call(["git", "reset", "HEAD", "--hard"], cwd=service_path)
|
subprocess.check_call(["git", "fetch", "--all"], cwd=service_path)
|
||||||
subprocess.check_call(["git", "pull"], cwd=service_path)
|
subprocess.check_call(["git", "reset", "--hard", default_branch], cwd=service_path)
|
||||||
# remove old build dir
|
# remove old build dir
|
||||||
subprocess.check_call([
|
subprocess.check_call([
|
||||||
"rm",
|
"rm",
|
||||||
|
|
Loading…
Reference in New Issue