AshlinHarris / MLDemo

Machine Learning with Synthetic Health Records
2 stars 0 forks source link

General config file for repository #8

Open AshlinHarris opened 2 years ago

AshlinHarris commented 2 years ago

Currently, config.ini contains the directory names from my own machine, with Windows directory syntax. Is there a simple way to upload a dummy config file to the repository while keeping my own local config file in its place?

AshlinHarris commented 2 years ago

Addressed partially in cc5f33854732685c62687fc340e00d597d86344d

AshlinHarris commented 2 years ago

This StackOverflow page gives some context on partial solutions and workarounds. It seems that there is no way to do this through git, though it's possible to generate the file through a make script if it isn't already present. As the answers suggest,

git update-index --assume-unchanged config.ini

will ignore local changes but is rewritten after a pull. Alternatively,

git update-index --skip-worktree config.ini

does the same but persists after a pull. Neither command has any effect on other users; any user who wants the same behaviour needs to run one of these commands locally before editing config.ini.

Ultimately, the file itself is subject to change, so neither git command is ideal in all cases.