Git keep file in repository but stop tracking local changes

git, github, repository, version-control

Solution

You can say git that assume file as unchanged with `--assume-unchanged` command

git update-index --assume-unchanged app.properties

Problem

I have an `app.properties` file with dummy values that I have committed and pushed to my Git repository. I would now like to tell Git to: - Stop tracking changes to my local `app.properties` file and - Keep the initial `app.properties` file that was committed to my repository intact. I have already added `*.properties` to my `.git/info/exclude` file, but `git status` is still detecting any changes that I make to my local `app.properties` file.

Original source