Skip to content

Instantly share code, notes, and snippets.

@darknoon29
Last active August 1, 2019 08:30
Show Gist options
  • Save darknoon29/52865858b439647452ca7c8ef2fefb7c to your computer and use it in GitHub Desktop.
Save darknoon29/52865858b439647452ca7c8ef2fefb7c to your computer and use it in GitHub Desktop.
Git Repository Clean up using .gitignore
Clean Up Local Repository
git clean -xdf --dry-run (Remove dry-run when first command ok)
or
Clean Up Local and remote Repository (Unix shell Required here)
git ls-files -i --exclude-from=.gitignore | xargs git rm --cached
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment