Skip to content

Instantly share code, notes, and snippets.

@prespondek
Created April 1, 2019 01:49
Show Gist options
  • Save prespondek/3cd7813a76a534ed6aa4513f053e4927 to your computer and use it in GitHub Desktop.
Save prespondek/3cd7813a76a534ed6aa4513f053e4927 to your computer and use it in GitHub Desktop.
// Delete files based on .gitignore without deleting local files
git rm --cached `git ls-files -i -X .gitignore`
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