Skip to content

Instantly share code, notes, and snippets.

@Abir-Tx
Last active April 21, 2021 21:38
Git ignore or remove tracked file

Ignore future changes of a tracked file

  • To ignore changes of tracked file
git update-index --assume-unchanged <file>
  • To start tracking changes of file again:
git update-index --no-assume-unchanged <file>

Remove file from being tracked

git rm --cached <file>
git commit -m 'chore: remove file'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment