How to ignore temporally files from git assuming them unchanged

Sometimes there are reasons why we don’t want to accidentally commit files with information that shouldn’t be on the log. In those cases, assume unchanged it’s what you need.

git update-index --assume-unchanged [FILE_NAME]

And afterwards when you need to add it to a commit

git update-index --no-assume-unchanged [FILE_NAME]

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s