Fix master init branch in Install scripts.

This commit is contained in:
Nourepide
2023-11-30 20:50:25 +03:00
parent a0337fbfe9
commit e31f410eb1
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -107,7 +107,7 @@ where /q git && if !ERRORLEVEL! equ 0 (
if not exist ".git" (
echo [Allor]: This directory is not a git repository. Initializing a new repository.
git init
git init -b main
git remote add origin https://github.com/Nourepide/ComfyUI-Allor
git fetch origin main
git reset --hard origin/main
@@ -140,7 +140,7 @@ if not (Path('.git').exists() or Path('.git').is_dir()):
print("[Allor]: This directory is not a git repository. Initializing a new repository.")
repo = Repo.init()
repo = Repo.init(initial_branch='main')
origin = repo.create_remote('origin', 'https://github.com/Nourepide/ComfyUI-Allor')
origin.fetch('main')
repo.git.reset('--hard', 'origin/main')
+2 -2
View File
@@ -50,7 +50,7 @@ if command -v git >/dev/null 2>&1; then
if [ ! -d ".git" ]; then
echo -e "\e[34m[Allor]\e[0m: This directory is not a git repository. Initializing a new repository."
git init
git init -b main
git remote add origin https://github.com/Nourepide/ComfyUI-Allor
git pull origin master
else
@@ -70,7 +70,7 @@ from pathlib import Path
if not (Path(".git").exists() or Path(".git").is_dir()):
print("\033[94m[Allor]\033[0m: This directory is not a git repository. Initializing a new repository.")
repo = Repo.init()
repo = Repo.init(initial_branch='main')
origin = repo.create_remote("origin", "https://github.com/Nourepide/ComfyUI-Allor")
origin.fetch("main")
repo.git.reset("--hard", "origin/main")