Skip to content

Instantly share code, notes, and snippets.

@nickcheng
Created January 26, 2018 01:16
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nickcheng/c261c22bf47f292da86b5f4048dec209 to your computer and use it in GitHub Desktop.
Save nickcheng/c261c22bf47f292da86b5f4048dec209 to your computer and use it in GitHub Desktop.
git aliases for ignoring files locally.
git config --global alias.ignore 'update-index --skip-worktree'
git config --global alias.unignore 'update-index --no-skip-worktree'
git config --global alias.ignored '!git ls-files -v | grep "^S"'

Ref: https://stackoverflow.com/posts/39086325/revisions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment