Skip to content

Instantly share code, notes, and snippets.

@jesusmacedo
Last active October 7, 2016 04:29
Show Gist options
  • Save jesusmacedo/2d821cd1c652ab2dd9d399da5e2e3dc2 to your computer and use it in GitHub Desktop.
Save jesusmacedo/2d821cd1c652ab2dd9d399da5e2e3dc2 to your computer and use it in GitHub Desktop.
Delete remote files and folders
git rm --cached <filename>
git rm --cached -r <dir_name>
// delete all .DS_Store occurrences
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
// add .DS_Store to .gitignore
.DS_Store
git commit -m "Removed folder from repository"
git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment