Implement git init
Allows creation of new git repo, may be of use in tests.
This commit is contained in:
parent
0d36a8a66a
commit
99877b3fbf
1 changed files with 3 additions and 0 deletions
|
@ -212,6 +212,9 @@ class GitApi():
|
|||
self.system_repository.run_checked('git', 'branch', '--show-current')
|
||||
return ''.join(self.system_repository.stdout).rstrip()
|
||||
|
||||
def init(self):
|
||||
self.system_repository.run_checked('git', 'init')
|
||||
|
||||
def add_file(self, file_path: Path):
|
||||
self.system_repository.run_checked('git', 'add', file_path)
|
||||
return self.system_repository.stdout
|
||||
|
|
Loading…
Reference in a new issue