5

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?

0

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! PowerShell script to loop thru all lnk files in the current folder: gci -Recurse *.lnk | %{git update-index --assume-unchanged $_.FullName}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.