Back Git

Temporarily ignore files with Git Assume Unchange

WRITTEN BY ON 04 Mar 2014
3,481 VIEWS • SHARES
0 comments

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
Join the discussion

Comments will be moderated and rel="nofollow" will be added to all links. You can wrap your coding with [code][/code] to make use of built-in syntax highlighter.