How to stop tracking changes to a file after the commit?

2

I have a .properties file already committed and would like to stop tracking changes made to it. Each user who clones the project will configure it their way.

I tried this command:

git rm --cached application/src/main/resources/props/services.properties

It does not return any error or success messages, I do not know if I should either.

But even so, after this command, if I make any changes to the file git finds the difference and lists the file as modified. What am I missing?

    
asked by anonymous 28.04.2016 / 22:28

1 answer

3

You are on the right path. The problem is that just removing the file will not cause git to stop crawling.

Entire process:

  • git rm --cached
  • Add the file in question to .gitignore
  • git commit
  • This removes the file and stops crawling new modifications. commit is required to perform operations.

        
    28.04.2016 / 23:07