-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgit_ignore_tip.txt
20 lines (10 loc) · 1000 Bytes
/
git_ignore_tip.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
If you are trying to ignore changes to a file that's already tracked in the repository
(e.g. a dev.properties file that you would need to change for your local environment but you would never want to check in these changes) than what you want to do is:
git update-index --assume-unchanged <file>
If you wanna start tracking changes again
git update-index --no-assume-unchanged <file>
Update: Since people have been asking, here's a convenient (and updated since commented on below) alias for seeing which files are currently "ignored" (--assume-unchanged) in your local workspace
$ git config --global alias.ignored = !git ls-files -v | grep "^[[:lower:]]"
$ git update-index --assume-unchanged externalConfHome/idNpw.properties
$ git update-index --assume-unchanged newtoy-spring/newtoy-spring-common-db/src/test/resources/externalConfHome/idNpw.properties
$ git update-index --assume-unchanged newtoy-spring/newtoy-spring-common-db/src/main/resources/properties/newToyConf.properties