Skip to content

Instantly share code, notes, and snippets.

@mayokunadeniyi
Created July 4, 2020 17:03
Show Gist options
  • Save mayokunadeniyi/d7133c9a5c2ba68b48723ca749c23e74 to your computer and use it in GitHub Desktop.
Save mayokunadeniyi/d7133c9a5c2ba68b48723ca749c23e74 to your computer and use it in GitHub Desktop.
Remove .DS_Store or any other file from you projects.

Remove existing files from the repository:

find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch Add the line

.DS_Store to the file .gitignore, which can be found at the top level of your repository (or created if it isn't there already). You can do this easily with this command in the top directory

echo .DS_Store >> .gitignore Then

git add .gitignore git commit -m '.DS_Store banished!'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment