Skip to content

Instantly share code, notes, and snippets.

@J535D165
Last active July 28, 2020 08:54
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 J535D165/ac0272a3051653628364aab169e9722f to your computer and use it in GitHub Desktop.
Save J535D165/ac0272a3051653628364aab169e9722f to your computer and use it in GitHub Desktop.
Git clean repo with respect to gitignore

Clean repo with respect to .gitignore file:

git rm -r --cached .
git add . 
git commit -m "Clean with respect to .gitignore"

Configure a global .gitignore file:

git config --global core.excludesfile ~/.gitignore_global
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment