Skip to content

Instantly share code, notes, and snippets.

@jdonson
Created September 24, 2013 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdonson/6686919 to your computer and use it in GitHub Desktop.
Save jdonson/6686919 to your computer and use it in GitHub Desktop.
This is how we scrub and ignore OS X DS_Store files using git.....
cp -pR first-null-commit first-null-commit-scrubbed
cd first-null-commit-scrubbed
vi .git/.gitignore # edit to ignore .DS_STORE files
git rm -rf .DS_STORE
git status
git add .
git commit -m 'https://github.com/jdonson/first-null-commit/issues/4 This is to prevent git from adding annoying DS_Store files to repo. See: http://stackoverflow.com/questions/107701/how-can-i-remove-ds-store-files-from-a-git-repository '
# how to test?
git status
git push
@Niteshvgupta
Copy link

What does the -pR stand for?

And how does this ensure the file will not be recreated?

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