Skip to content

[feature]: loopflow init should offer to add .loopflow/worktrees/ to .gitignore #5

Description

@faisalishfaq2005

What problem would this solve?

init.ts prints "Add .loopflow/worktrees/ to your .gitignore" as a manual instruction (around line 33). Since dirty worktrees
are kept on disk for review, forgetting this leads to committing scratch checkouts.

Proposed solution

Improve init to detect whether .gitignore already contains the entry and, if not, append it (or at minimum print the exact line to copy). Keep it idempotent — running init twice shouldn't add the line twice.

Where to start: src/commands/init.ts. Add a test that runs init against a temp dir.

Alternatives considered

No response

Scope

  • I've checked this isn't already on the roadmap in the README.
  • This can't reasonably be expressed as a loop instead of engine code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions