my hottest git take is that .gitignore is an antipattern
@aescling Sometimes I don't need a thousand lines of git status for a directory I should be ignoring.
@aschmitz git config status.showUntrackedFiles false is an option
@aescling But I also want it to catch files that need to be added and I missed.
@aschmitz that’s fair
@aescling What??
Then how am I supposed to tell Git to ignore my Vim .swp files?
@vaporeon_ dump git add -A and the like and learn the magic of git add -p
@aescling I just use regular git add most of the time
But what's the point, what would it get me not to use the feature that specifically is there to prevent files from being added to the git repository to prevent files that I don't want to be added to the git repository from being added to the git repository?
@vaporeon_ to make a habit of adding files, and even more pawerfully, specific changes deliberately
@vaporeon_ the latter is what git add -p (that is, --patch) is designed to make pawsible to do
@aescling I probably should look into git add -p at some point, if I ever care about having a proper commit history where each commit is a particular change or set of changes...
@aescling It sure is easier to add files deliberately when git status doesn't show me a lot of files that I don't care about, such as compiled binaries and Vim .swp files. And that's why I add those to .gitignore, so that git status only shows the status that I actually care about!
@vaporeon_ ftr, you can tell vim to store all swapfiles in a purrticular directory (e.g., set directory=~/.vim/swap// (double slash intentional)) if you want to avoid littering swap files all over the filesystem
@aescling Ooh, that seems useful!
@aescling begrudgingly admitting that you are correct, you can tell it's a hot take because i got real life mad about it
you shouldn’t be using git in a way where it would affect your workflow