logoalt Hacker News

dietr1chyesterday at 5:27 PM1 replyview on HN

I have a small user-global gitignore that most of the job for me,

    ```.gitignore
    # Ignores
    ## Unix hidden files
    .*
    ## Temporary files and backups
    *~
    *.swp
    *.bak  
    
    # Exceptions
    !.ignore
    !.gitignore
    ```

But I tend to copy it over and extend it as I go, and there's well-known reference gitignore files to skim for if you have anxiety around any particular language/editor/tool.

Now, I could extend my user-global ignore, but there's no project where I want the state of the repo to be wrong, but my local state saving me unknowingly, as I know it'll bite others.


Replies

mschuster91yesterday at 7:14 PM

> Now, I could extend my user-global ignore

I'd add .nvmrc and .npmrc if you work with NodeJS.

show 1 reply