Chapter Five · Housekeeping
Ignoring and Setting Aside
Three pages of cleanup: the files Git should never see, the awkward sequel when one of them is already committed, and the drawer you put half-finished work in when something urgent arrives.
A short chapter about keeping the repository clean, sitting between the two large ones on either side of it.
Three topics. The files Git should never see, and the one plain text file that keeps all of them out. The awkward case where one of those files is already committed, which is not solved by ignoring it and — if the file was a secret — does not start with a Git command at all. And the drawer you put half-finished work into when something urgent interrupts you.
None of this is difficult. All of it is the difference between a repository that stays pleasant to work in and one that quietly accumulates four hundred megabytes of things nobody meant to keep.
.env — the category that costs real moneynode_modules/ and friends — huge, and reinstallable in one command.DS_Store · editor folders — clutter that makes status unreadable