vendredi 17 avril 2015

Git reset --hard head (revert) and symbolic links in Windows

I created a symbolic link in Windows 7 to a version controlled file called xyz.txt like this:



mklink /H ..\xyz.txt xyz.txt


The destination of the symbolic link is not part of the git working copy, and is not version controlled


When I change the contents of the file on either side of the symbolic link, it works fine.


However, when I revert the file (for example using git reset --hard HEAD), the target of the symbolic link doesn't update to the unmodified version of the file, as I would expect.


What explains this behavior, and how can I work around it?


Aucun commentaire:

Enregistrer un commentaire