Globally gitignore the .DS_Store file

ShellPosted on

If you are using macOS, your system appends the .DS_Store file in your directories. It’s not a big issue, but often you need to exclude these files explicitly in your .gitignore file, to prevent any unnecessary files in your commit.

You may want to ignore this file globally, so next time you don’t need to add it to your project’s ignore list.

git config --global core.excludesfile ~/.gitignore

echo .DS_Store >> ~/.gitignore

Need a web developer? Maybe we can help, get in touch!

Similar Posts

More content in Shell category