How to remove git tracking but keep file in repo

  1. I do not want to delete the file in the repo.
  2. I do want the file cloned a developers and my machine.
  3. However, I do want to ignore the file from future check in/push.

My goal is that only files that are actually modified .c/.h are what shows up after running a git status. I have already modified the .gitignore but the project was uploaded into GitLab including Makefiles and other miscellaneous files that are necessary for building the project but get modified each time anyone does a build on their machine. It just needless garbage on the screen to sift through.