This is one of my most frequent used git command. For example, I have a config file, and the local version and live version are different (Database credentials, host...). And I set assume unchanged to this config file. With this command, even if I modifed this file, it won't get committed. Git will ignore it.
git update-index --assume-unchanged samples.xml