Skip to content

Instantly share code, notes, and snippets.

@rvteja92
Last active June 9, 2016 17:48
Show Gist options
  • Save rvteja92/ee0e42f96e9437b52536fe11d1ac6c37 to your computer and use it in GitHub Desktop.
Save rvteja92/ee0e42f96e9437b52536fe11d1ac6c37 to your computer and use it in GitHub Desktop.
Handy git commands not regularly used but very helpful

Keep file in repository but do not track changes

To ignore changes to a file

git update-index --assume-unchanged <file>

To tracking again

git update-index --no-assume-unchanged <file>

Remove file from repository but keep physically

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