Skip to content

Instantly share code, notes, and snippets.

@alwerner
Last active March 21, 2022 23:14
Show Gist options
  • Save alwerner/4978755 to your computer and use it in GitHub Desktop.
Save alwerner/4978755 to your computer and use it in GitHub Desktop.
retroactively add items to .gitignore
// make change to .gitignore
git rm --cached <filename>
// or, for all files
git rm -r --cached .
git add .
// then
git add -u
git commit -m "manually delete files"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment