Show More
@@ -701,7 +701,7 b' class GitRepository(BaseRepository):' | |||
|
701 | 701 | stdout, _ = self.run_git_command(['rev-parse', '--abbrev-ref', 'HEAD']) |
|
702 | 702 | return stdout.strip() |
|
703 | 703 | |
|
704 | def _checkout(self, branch_name, create=False): | |
|
704 | def _checkout(self, branch_name, create=False, force=False): | |
|
705 | 705 | """ |
|
706 | 706 | Checkout a branch in the working directory. |
|
707 | 707 | |
@@ -715,6 +715,8 b' class GitRepository(BaseRepository):' | |||
|
715 | 715 | raise RepositoryError('Cannot checkout branches in a bare git repo') |
|
716 | 716 | |
|
717 | 717 | cmd = ['checkout'] |
|
718 | if force: | |
|
719 | cmd.append('-f') | |
|
718 | 720 | if create: |
|
719 | 721 | cmd.append('-b') |
|
720 | 722 | cmd.append(branch_name) |
General Comments 0
You need to be logged in to leave comments.
Login now