Skip to content

Bug: Squad init in existing project marks all files as new in GIT #1026

Closed

Description

@bpikaar

In my existing project I installed squad, which has files for an existing web app.

 npm i @bradygaster/squad-cli

after that I initialized squad

 npx squad init   

After this all the files in my folder are marked as new, but the branch was up-to-date. I don't have branches, just pushed to main.

Activity

  1. changed the title [-]squad init in existing project marks all files as new in GIT[/-] [+]Bug: Squad init in existing project marks all files as new in GIT[/+] on Apr 22, 2026
  2. CarlosSardo commented on Apr 22, 2026

    @CarlosSardo
    Contributor

    thanks @bpikaar

    Can you please share more details about your exisiting setup?

    OS, VSCode version, Model used, etc. Thanks!

  3. bpikaar commented on Apr 22, 2026

    @bpikaar
    Author

    Mac OS Tahoe 26.4.1
    VSCode Version: 1.115.0
    Model Raptor mini

    I thought about why this happened and i think it is because of my folder structure. I have a bit a an unconventional repo. The main folder (which is the root of the repo) has multiple project folders. All these folders have package.json and node_modules. Maybe this caused the error?

    I deleted the entire repo and cloned it again. I added squad to a subfolder and did the squad init again. Again all the files that where in my repo are marked as new.

    I just tried to reproduce it in an empty folder with the same setup, but it didn't occur this time. The setup is:

    • parent folder
      • .git
      • project folder
        • index.html
        • app.js
        • node_modules
        • package.json
  4. bradygaster commented on Aug 26, 2026

    @bradygaster
    Collaborator

    Disposition: fixed by #944; not reproducible on current Squad

    I ran two clean, disposable reproductions with the validated bradygaster/AspireAppTemplate fixture at 4fe6ccf, using the official Squad v0.13.0 Windows x64 standalone artifact.

    Run Pre-init Complete post-init diff Pre-existing tracked files changed Pre-existing application files spuriously new/changed
    Repository root clean; 84 tracked files 170 added, 2 modified .gitattributes, .gitignore only 0
    Tracked frontend/ subproject (matches reported nested-project shape) clean; 84 tracked files 166 added, 1 modified frontend/.gitignore only 0

    The nested run detected the monorepo, put .squad/ under frontend/, put squad.agent.md at the Git root, and did not create frontend/.git. None of the fixture's .tsx, .ts, .cs, project, solution, package, or other application files changed status.

    Raw pre/post porcelain status, full binary diffs, name-status output, diff stats, CLI output, and the machine-readable summary are preserved here:

    The reported symptom is consistent with the historical behavior tracked in #939: Squad used to run git init inside a repository subfolder. An editor opening that nested repository would then see the subproject's existing outer-repository files as new. PR #944 removed that behavior and added the monorepo regression coverage on April 14, 2026: https://github.com/bradygaster/squad/pull/944. #1026 was reported April 22; the fix reached a public release in v0.9.4 on April 25: https://github.com/bradygaster/squad/releases/tag/v0.9.4.

    Closing as already fixed by #944. No product-code change or new PR is warranted from this graduation run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triagedIssue has been triagedwave:1-nextWave 1 — immediate next sprint

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions