Compare commits

...

1 Commits

Author SHA1 Message Date
Adam Majer
aa73d97b35 New branch is empty
New branches must be born empty
2024-06-10 15:35:11 +02:00

View File

@ -85,7 +85,7 @@ class Git:
"""Checkout into the branch HEAD"""
new_branch = False
if branch not in self.branches():
self.git_run(["branch", "-q", branch, "HEAD"])
self.git_run(["switch", "-q", "--orphan", branch])
new_branch = True
else:
ref = f"refs/heads/{branch}"