diff --git a/lib/git.py b/lib/git.py index 635924c..ef77e2b 100644 --- a/lib/git.py +++ b/lib/git.py @@ -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}"