• hallettj@leminal.space
    link
    fedilink
    English
    arrow-up
    10
    ·
    1 天前

    Global gitignore is for idiosyncrasies of your computer, not for repo-specific stuff. For example if you use an editor that writes in-place backup or swap files (like .swp files with Vim’s default settings), or you’re on a Mac which writes .DS_Store files into every directory, you’re going to want those ignored for every repo. That way you can comfortably work with other people’s repos, even if they’re not configured for your particular setup.

    The global ignore combines with gitignore files in each repo. So if it’s an ignore pattern that everyone working with that repo should have, put it in the repo.