usevim
Published in

usevim

Global Git Ignore

For years I dumped this into my .gitignore files: *.sw?. Then I realised that some people don't use Vim, and therefore probably don't want to see my editor-specific .gitignore entries. Different editors handle swap and recovery files different ways, so it seems redundant to force these settings on everyone.

A better approach is to use a global option. Run git config --global core.excludesfile ~/.gitignore. Then you can add *.sw?, and perhaps *~ as well. I like to add .DS_Store because Windows developers don't need to worry about that nonsense, and they should probably add Thumbs.db.

--

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alex R. Young

Alex R. Young

Software critic.

More from Medium

Git: Local vs Remote branch

Git and GitHub basic concepts

Version Control with Git

GIT Commands