Skip to content

Instantly share code, notes, and snippets.

@selahssea-zz
Last active August 29, 2015 14:08
Show Gist options
  • Save selahssea-zz/967e37d761ceba4649aa to your computer and use it in GitHub Desktop.
Save selahssea-zz/967e37d761ceba4649aa to your computer and use it in GitHub Desktop.
Exclude tracked (commited) files after adding to gitignore
#! /bin/bash
git ls-files -ci --exclude-standard -z | xargs -0 git rm --cached
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment