1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-03 07:08:01 +00:00

Add Ignore Changes To A Tracked File as a git til.

This commit is contained in:
jbranchaud
2015-07-24 13:50:53 -05:00
parent 23fe47ac2a
commit 26f0d23588
2 changed files with 15 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
# Ignore Changes To A Tracked File
Files that should never be tracked are listed in your `.gitignore` file. But
what about if you want to ignore some local changes to a tracked file?
You can tell git to assume the file is unchanged
```bash
$ git update-index --assume-unchanged <some-file>
```
Reversing the process can be done with the `--no-assume-unchanged` flag.
[source](http://blog.pagebakers.nl/2009/01/29/git-ignoring-changes-in-tracked-files/)