If that's the case then you shouldn't have the file versioned at all; you should version a template of the file. For example, if the configuration file is foo/config.txt
then you should have a versioned foo/config.txt.template
in the repository with example (or blank) configuration settings. foo/config.txt
should not be in the repository at all, and should be ignored with .gitignore
.
Then, in a new clone, you just copy foo/config.txt.template
to foo/config.txt
and alter the settings as appropriate.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…