How to track .lnk files in git?

微笑、不失礼 提交于 2019-12-10 18:28:36

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!