Use git fetch for getting the latest SD commits

This commit is contained in:
cmdr2 2022-10-04 14:36:20 +05:30
parent ecda0d5b05
commit 2174788514

View File

@ -23,7 +23,7 @@ def fetch_repo():
if not is_developer_mode:
helpers.run("git reset --hard", run_in_folder=app.stable_diffusion_repo_dir_path)
helpers.run("git pull", run_in_folder=app.stable_diffusion_repo_dir_path)
helpers.run("git fetch origin", run_in_folder=app.stable_diffusion_repo_dir_path)
helpers.run(f'git -c advice.detachedHead=false checkout "{commit_id}"', run_in_folder=app.stable_diffusion_repo_dir_path)
else:
helpers.log("\nDownloading Stable Diffusion..\n")