repomix icon indicating copy to clipboard operation
repomix copied to clipboard

simple way to only include git-tracked files

Open pchalasani opened this issue 6 months ago • 6 comments

Description

Maybe I missed this option but currently what I do is I create a custom include list that contains only files that show up in the in git tracking. And then add on some exclude patterns on top of that. It would be nice to have a way a more direct way to only include git tracked files.

pchalasani avatar Jun 13 '25 15:06 pchalasani

Hi, @pchalasani ! Thank you for the suggestion!

We haven't released it yet, but we're implementing a feature to pass file lists via --stdin in #648.

This would allow you to do something like:

git ls-files | repomix --stdin

Would passing files through stdin satisfy your requirements?

Or if you have any specific options or features in mind that you'd prefer, please let us know.

yamadashy avatar Jun 17 '25 15:06 yamadashy

Would passing files through stdin satisfy your requirements?

that would be awesome, thanks!

pchalasani avatar Jun 17 '25 15:06 pchalasani

git ls-files | repomix --stdin

I assume when we do this RepoMix will also take into account the config.json with various include exclude patterns?

pchalasani avatar Jun 17 '25 15:06 pchalasani

The current stdin implementation ignores existing include/ignore patterns, but thinking about it again, this breaks consistency with our existing processing logic. It would be more intuitive if stdin files could be injected into the included file set, with ignore patterns still being applied.

We’ll consider and implement it that way.

yamadashy avatar Jun 19 '25 01:06 yamadashy

I've implemented the stdin feature you requested!

  • https://github.com/yamadashy/repomix/pull/680

The stdin input respects your existing include/ignore patterns from configuration, so it works exactly as you wanted.

Please wait for the next release!

yamadashy avatar Jun 27 '25 15:06 yamadashy

@pchalasani This feature has been implemented and released in v1.0.0!

https://github.com/yamadashy/repomix/releases/tag/v1.0.0

You can now easily include only git-tracked files using:

git ls-files | repomix --stdin

Please give it a try! Thank you for your suggestion!

yamadashy avatar Jun 30 '25 15:06 yamadashy