mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-10-01 01:26:03 -04:00
More robust way of initializing empty .git folder
This commit is contained in:
parent
1d5a015ce7
commit
258d046218
@ -198,7 +198,7 @@ def install_webui():
|
|||||||
def update_requirements(initial_installation=False):
|
def update_requirements(initial_installation=False):
|
||||||
# Create .git directory if missing
|
# Create .git directory if missing
|
||||||
if not os.path.isdir(os.path.join(script_dir, ".git")):
|
if not os.path.isdir(os.path.join(script_dir, ".git")):
|
||||||
git_creation_cmd = 'git init -b main && git remote add origin https://github.com/oobabooga/text-generation-webui && git fetch && git remote set-head origin -a && git reset origin/HEAD && git branch --set-upstream-to=origin/HEAD'
|
git_creation_cmd = 'git init -b main && git remote add origin https://github.com/oobabooga/text-generation-webui && git fetch && git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main && git reset --hard origin/main && git branch --set-upstream-to=origin/main'
|
||||||
run_cmd(git_creation_cmd, environment=True, assert_success=True)
|
run_cmd(git_creation_cmd, environment=True, assert_success=True)
|
||||||
|
|
||||||
files_to_check = [
|
files_to_check = [
|
||||||
|
Loading…
Reference in New Issue
Block a user