Merge pull request 'New branch is empty' (#26) from adamm/git-importer:fix_inintial_branch into use_git_for_sha256
Reviewed-on: #26 Reviewed-by: Dirk Mueller <dirkmueller@noreply@src.opensuse.org>
This commit is contained in:
commit
033b8f8cee
@ -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}"
|
||||
|
Loading…
Reference in New Issue
Block a user