Skip to content

Instantly share code, notes, and snippets.

@junrillg
Forked from nickcheng/gitaliases.md
Created June 5, 2024 22:43
Show Gist options
  • Select an option

  • Save junrillg/91b34fb627b3cacccdd05b13bb2cc7cf to your computer and use it in GitHub Desktop.

Select an option

Save junrillg/91b34fb627b3cacccdd05b13bb2cc7cf 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