Ignore File Changes without using .gitignore

I am taking a note regarding this way of ignoring file changes just encase you guys bump in to the situation where the file is not included to your .gitignore file and you want to keep it track later on.

This will tell git you want to start ignoring the changes to the file
git update-index  ––assume-unchanged path/to/file
(This command will assume that there is no changes to the specified file , so no need to worry if you’ll accidentally committed its changes)

When you want to start keeping track again
git update-index ––no-assume-unchanged path/to/file

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 )

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s