Skip to content

Instantly share code, notes, and snippets.

@wiccy46
Created February 21, 2020 16:22
Show Gist options
  • Save wiccy46/0d2376cb4d43456b36f8a9ff6fa25d6c to your computer and use it in GitHub Desktop.
Save wiccy46/0d2376cb4d43456b36f8a9ff6fa25d6c to your computer and use it in GitHub Desktop.
[dsstoreRemove] Remove DS_Store from git, #git
Step 1: In order to remove existing files from the repository:
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
Step 2: Add this line '.DS_Store' to your .gitignore file, which can be found at the top level of your repository (or create if it isn't there already. Use the following command to do so:
echo .DS_Store >> .gitignore
Step 3: Then run the following command:
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