问题
I have .lnk files in my git repo. And other users are able to use them after cloning the repo successfully.
However, once you have used it (clicked on it for example), it automatically becomes modified in git. Is there a way to avoid this?
In general, what is your best practice for tracking .lnk files in git? Or is there a better alternative?
回答1:
You can point git to assume that this lnk
file is unchanged by:
git update-index --assume-unchanged <lnk-file>
You can undo that by:
git update-index --no-assume-unchanged <lnk-file>
I think you should avoid upload lnk
files to git because they are easily generated. so you should make a batch script for generating them and point anyone in documentation to run that script after downloading code.
来源:https://stackoverflow.com/questions/33608937/how-to-track-lnk-files-in-git