Hacker News new | ask | show | jobs
by kevsim 1938 days ago
I think I'd even take it a step further and not rely on the fact that it's been imported (which sounds a bit fragile and language specific). The number of times I have a new local that I don't want to add is far far smaller than the number of times I have a new local file that I forgot to add, so I'd want to be warned whenever I'm pushing with unstaged local files.

We use a git hook for this currently and it's super useful.

1 comments

That does sound useful. I usually have a raft of local files with logs or different test scripts but not with the main extension of the repo (e.g ten .plan files and that one new .tf file , or seventeen config files but that one go file). And forgetting to add that new file is our top build failure I think.
Local files like that are fine, just keep them in your .gitignore