Skip to content

Conversation

claytonrcarter
Copy link
Collaborator

This updates git record and git amend to detect and optionally add new, untracked files when they are run.

  • every invocation of git record and git amend updates a list of "known" untracked files in our internal sqlite db
  • if a "new" untracked file is detected (ie it's on disk now, but isn't in the list from last run, in the db) then:
    • --untracked skip: (default) do nothing, as with current behavior
    • --untracked add: add all new files
    • --untracked prompt: prompts user for what to do with each file (add, skip, skip remaining, help)
  • default behavior can be configured via branchless.record.untrackedFiles setting
  • no untracked files are added/prompted if record/amend are invoked w/ staged changes
  • a list of "known" (previously skipped) files is printed
  • TODO probably want an --untracked off option, to disable all untracked file handling (eg if a repo often has lots and lots of untracked files (for reasons?) then this could be obnoxious)

@claytonrcarter claytonrcarter force-pushed the record-untracked branch 2 times, most recently from 4dd84c1 to 967c4e8 Compare September 12, 2025 14:22
@claytonrcarter claytonrcarter changed the title feat(record/amend): add support for detecting and adding untracked file feat(record/amend): add support for detecting and adding untracked files Sep 26, 2025
Primarily for creating new, empty commits with automatic rebasing, for when you
know you want to add something into a stack but you're not yet sure what.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant