Git Symlinks in Windows

前端 未结 13 1559
执念已碎
执念已碎 2020-11-22 09:23

Our developers use a mix of Windows and Unix based OS\'s. Therefore, symlinks created on Unix machines become a problem for Windows developers. In windows (msysgit), the sym

13条回答
  •  猫巷女王i
    2020-11-22 09:34

    One simple trick we use is to just call git add --all twice in a row.

    For example, our Windows 7 commit script calls:

    $ git add --all
    $ git add --all
    

    The first add treats the link as text and adds the folders for delete.

    The second add traverses the link correctly and undoes the delete by restoring the files.

    It's less elegant than some of the other proposed solutions but it is a simple fix to some of our legacy environments that got symlinks added.

提交回复
热议问题