Hacker News new | ask | show | jobs
by stavros 536 days ago
Are new files tracked by default? If I forget to ignore a bunch of build outputs, will that make my repo huge immediately?
1 comments

There’s a configurable cap on max file size to auto-add, IIRC. It defaults to something “reasonable”.

If you do somehow add a terabyte of small files by accident, it’s still just git under the hood so you can make sure nothing active points at them and GC them.

I'm thinking of something like node_modules, sounds like I'll need to not forget.
Those are usually in your gitignore, right?

Also, this behavior (automatically tracking) is configurable. I thought I would hate it but I actually really like it.

Yeah they usually are, I'm sure it's great because I add files more often than I ignore, but I need to be careful with the temporary files I write left and right in the repo dir during development.
Why? You can easily remove them if they’re accidentally added.
Just because I might not remember/notice, and I don't want sensitive data to be committed by accident if I put an env var on disk for some reason.