Make replit.nix and .replit automatically ignored when git is enabled

Describe your feature request

Make replit.nix and .replit automatically ignored when git is enabled. Not gitignore as that would pollute too, use a local method.

What problem(s) would this feature solve?
It is super annoying when trying to contribute to an open source project. You fork on GitHub, you get ready to push your changes and then you see that replit.nix and .replit get carried along. Grrr
Explain what you were trying to do when you came across the problem leading to this feature request
Contribute to an open source project

2 Likes

I would say the same should apply for when you download the project as a zip too.

4 Likes

This’d be difficult to implement. Just add it to the gitignore (and maybe also add the gitignore to the gitignore).

1 Like

It is probably possible in a template already, just not by defualt.

2 Likes

This might theoretically work:

onBoot = "git config --global core.excludesfile ~/.gitignore && echo .replit>~/.gitignore && echo replit.nix >> ~/.gitignore"

(On boot because git stores its config outside the repl’s base dir)

3 Likes

or shell.nix setup hook but yes.

2 Likes