Skip to content

Commit 6197057

Browse files
committed
--assume-unchanged and no--assume-unchanged
1 parent 7f3f56c commit 6197057

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@
6969
* [Fetch pull request by ID to a local branch](https://github.com/git-tips/tips#fetch-pull-request-by-id-to-a-local-branch)
7070
* [Show the most recent tag on the current branch.](https://github.com/git-tips/tips#show-the-most-recent-tag-on-the-current-branch)
7171
* [Show inline word diff.](https://github.com/git-tips/tips#show-inline-word-diff)
72+
* [Don’t consider changes for tracked file.](https://github.com/git-tips/tips#dont-consider-changes-for-tracked-file)
73+
* [Undo assume-unchanged.](https://github.com/git-tips/tips#undo-assume-unchanged)
7274

7375
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
7476
<!-- @doxie.inject end toc -->
@@ -485,5 +487,15 @@ git describe --tags --abbrev=0
485487
git diff --word-diff
486488
```
487489

490+
## Don’t consider changes for tracked file.
491+
```sh
492+
git update-index --assume-unchanged <file_name>
493+
```
494+
495+
## Undo assume-unchanged.
496+
```sh
497+
git update-index --no-assume-unchanged <file_name>
498+
```
499+
488500
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
489501
<!-- @doxie.inject end -->

tips.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,5 +276,13 @@
276276
{
277277
"title": "Show inline word diff.",
278278
"tip": "git diff --word-diff"
279+
},
280+
{
281+
"title": "Don’t consider changes for tracked file.",
282+
"tip": "git update-index --assume-unchanged <file_name>"
283+
},
284+
{
285+
"title": "Undo assume-unchanged.",
286+
"tip": "git update-index --no-assume-unchanged <file_name>"
279287
}
280288
]

0 commit comments

Comments
 (0)