How can I prevend to be touched a particular file also if I checkout a branch where there is this file. I tried with gitignore but it there is in the branch it will be overwrite.
Asked
Active
Viewed 52 times
1 Answers
0
To prevent changes from being tracked after you ignore the file you'll need to tell Git to remove it from tracking:
git rm --cached <file>
If you're asking how to block changes to a file, Git doesn't do that.

isherwood
- 58,414
- 16
- 114
- 157