Is there a way to "freeze" a file in Git?
- by Suan
I'm in a situation where I want to open source my project, however there's a single source file that I want to release a "clean" version of, but use a separate version locally. Does git have a feature where I can just commit a file once, and it stops looking for changes on that file from now on?
I've tried adding the file to .gitignore, but after the first time when I do a git add -f and git commit on the file, and I proceed to edit it again, git status shows the file as changed. The ideal behavior would be for git to not show this file as changed from now on, even though I've edited it.
I'd also be interested in how others have dealt with "scrubbing" their codebases of private code/data before pushing to an open source repo, especially on Git.