Ignorar los cambios locales en los archivos rastreados:
git update-index --assume-unchanged my-file.php
Ignorar los cambios locales en los archivos rastreados:
git update-index --no-assume-unchanged my-file.php
fuente: git help update-index
--[no-]assume-unchanged
...
This option can be also used as a coarse file-level mechanism to ignore uncommitted changes in tracked
files (akin to what .gitignore does for untracked files). Git will fail (gracefully) in case it needs to
modify this file in the index e.g. when merging in a commit; thus, in case the assumed-untracked file is
changed upstream, you will need to handle the situation manually.
update-index --assume-unchanged
@see stackoverflow.com/a/25253144/292408