Ignoring updates in git

Some times you create a file like password.properties, that you commit with fake values. But then you want to update the content of that file and be sure that is never pushed to the remote.

To do that you have to follow the next steps:

  1. Create the fake password.properties with fake data.
  2. Commit the changes
  3. Add password.properties to your .gitignore
  4. Avoid future git updates with: git update-index –assume-unchanged password.properties

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 )

Connecting to %s