[GH-ISSUE #1276] UPDATE.bat cannot update existing checkouts after the main history rewrite #524

Closed
opened 2026-11-04 01:43:45 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @nirvash on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1276

Problem

The recent force-update of main prevents existing checkouts from updating through the normal UPDATE.bat workflow.

The rewritten history appears to remove Claude-related commit trailers. Regardless of the reason for that cleanup, existing users need a documented migration path.

I do not normally use UPDATE.bat and did not run it to reproduce this failure. I encountered the rewritten history while updating manually, then inspected UPDATE.bat to check the impact on users of the supplied updater. The behavior described below follows from the verified Git history and the script's control flow.

Evidence

My checkout was on the previous main at:

6f32ec070f23ced9f50e704d854d775da52591ab

No local commits or rebases were made. After fetching, Git recorded:

fetch --quiet origin: forced-update

The new upstream tip at the time of checking was:

82f46a8c8f475f001ad76d92f58f4a4f8ffb0253

git merge-base finds no common ancestor between these histories.

This is not limited to a few recent commits: the old history and the corresponding rewritten history each contain 845 commits, with no shared commit IDs. The root commit IDs also differ.

For example, old commit 6f32ec0 and its rewritten counterpart a1641e9 have identical file trees, author dates and subjects. The latter omits the former's Claude-related trailers and has a different parent. This describes an observed difference, not a confirmed explanation from the maintainer.

Effect on UPDATE.bat

UPDATE.bat runs git pull --ff-only and exits if that command fails.

Consequently, affected checkouts cannot fast-forward, and the script never reaches setup.py --update. The source, engine and Python packages remain at their previous versions.

The script's failure message says:

git pull did not succeed (the reason is above): nothing was updated.
Files you changed here can stop it: "git status" lists them.

That message does not explain the upstream history rewrite or provide recovery instructions. Users may mistake the failure for a problem with their local changes, or simply stop trying and remain on an outdated version. Re-running UPDATE.bat does not resolve it.

The script does report a failure; it does not literally report "no updates available." The concern is that existing users lose the normal update path without actionable migration guidance.

Requested improvement

  • Announce the history rewrite and explain which existing checkouts are affected.
  • Document a safe recovery procedure that preserves local changes, model configurations and downloaded model files.
  • Have the updater detect this situation and clearly explain why the update failed and how to recover.
  • Avoid automatically using git reset --hard or git clean, as users may have local modifications and custom configurations.

Workaround used

I preserved the old branch and local changes, created a new branch tracking the rewritten origin/main, and then ran setup.py --update.

Related: #475, which introduced UPDATE.bat.

Originally created by @nirvash on GitHub (Oct 6, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/1276 ## Problem The recent force-update of `main` prevents existing checkouts from updating through the normal `UPDATE.bat` workflow. The rewritten history appears to remove Claude-related commit trailers. Regardless of the reason for that cleanup, existing users need a documented migration path. **I do not normally use UPDATE.bat and did not run it to reproduce this failure.** I encountered the rewritten history while updating manually, then inspected UPDATE.bat to check the impact on users of the supplied updater. The behavior described below follows from the verified Git history and the script's control flow. ## Evidence My checkout was on the previous `main` at: `6f32ec070f23ced9f50e704d854d775da52591ab` No local commits or rebases were made. After fetching, Git recorded: ```text fetch --quiet origin: forced-update ``` The new upstream tip at the time of checking was: `82f46a8c8f475f001ad76d92f58f4a4f8ffb0253` `git merge-base` finds no common ancestor between these histories. This is not limited to a few recent commits: the old history and the corresponding rewritten history each contain 845 commits, with no shared commit IDs. The root commit IDs also differ. For example, old commit `6f32ec0` and its rewritten counterpart `a1641e9` have identical file trees, author dates and subjects. The latter omits the former's Claude-related trailers and has a different parent. This describes an observed difference, not a confirmed explanation from the maintainer. ## Effect on UPDATE.bat `UPDATE.bat` runs `git pull --ff-only` and exits if that command fails. Consequently, affected checkouts cannot fast-forward, and the script never reaches `setup.py --update`. The source, engine and Python packages remain at their previous versions. The script's failure message says: ```text git pull did not succeed (the reason is above): nothing was updated. Files you changed here can stop it: "git status" lists them. ``` That message does not explain the upstream history rewrite or provide recovery instructions. Users may mistake the failure for a problem with their local changes, or simply stop trying and remain on an outdated version. Re-running UPDATE.bat does not resolve it. The script does report a failure; it does not literally report "no updates available." The concern is that existing users lose the normal update path without actionable migration guidance. ## Requested improvement - Announce the history rewrite and explain which existing checkouts are affected. - Document a safe recovery procedure that preserves local changes, model configurations and downloaded model files. - Have the updater detect this situation and clearly explain why the update failed and how to recover. - Avoid automatically using `git reset --hard` or `git clean`, as users may have local modifications and custom configurations. ## Workaround used I preserved the old branch and local changes, created a new branch tracking the rewritten `origin/main`, and then ran `setup.py --update`. Related: #475, which introduced UPDATE.bat.
Author
Owner

@Niko1221 commented on GitHub (Oct 7, 2026):

Fixed in 0.1.40.2: UPDATE.bat and update.sh now notice a clone that is on the history from before 2026-10-06 (no commit in common with origin/main). When no tracked file of yours is edited they keep your old commits in a branch called pre-cleanup-backup and move the clone to the new history; when something is edited they print the two commands and change nothing. Your models, settings and engine are untracked files and are never touched. The scripts you already have (0.1.40 and older) cannot do this themselves, so run these once in the Strata folder and use UPDATE.bat as usual afterwards (run git stash first if git status lists edited files):

git fetch origin
git branch pre-cleanup-backup
git checkout -B main origin/main

Thanks for the report, and to elanonimo832 for PR #1205, whose message change this builds on.

<!-- gh-comment-id:6038124038 --> @Niko1221 commented on GitHub (Oct 7, 2026): Fixed in 0.1.40.2: UPDATE.bat and update.sh now notice a clone that is on the history from before 2026-10-06 (no commit in common with origin/main). When no tracked file of yours is edited they keep your old commits in a branch called pre-cleanup-backup and move the clone to the new history; when something is edited they print the two commands and change nothing. Your models, settings and engine are untracked files and are never touched. The scripts you already have (0.1.40 and older) cannot do this themselves, so run these once in the Strata folder and use UPDATE.bat as usual afterwards (run `git stash` first if `git status` lists edited files): git fetch origin git branch pre-cleanup-backup git checkout -B main origin/main Thanks for the report, and to elanonimo832 for PR #1205, whose message change this builds on.
Author
Owner

@djmaze commented on GitHub (Oct 7, 2026):

Why was history rewritten?

<!-- gh-comment-id:6038338542 --> @djmaze commented on GitHub (Oct 7, 2026): Why was history rewritten?
Author
Owner

@nirvash commented on GitHub (Oct 7, 2026):

Thanks for addressing this in 0.1.40.2 and documenting the recovery steps. Preserving the old history in pre-cleanup-backup and stopping when tracked files have local edits addresses the main concern about protecting user work. Much appreciated!

<!-- gh-comment-id:6040624714 --> @nirvash commented on GitHub (Oct 7, 2026): Thanks for addressing this in 0.1.40.2 and documenting the recovery steps. Preserving the old history in pre-cleanup-backup and stopping when tracked files have local edits addresses the main concern about protecting user work. Much appreciated!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#524
No description provided.