I tried make git hooks on Windows to do automatically convert unix symlinks located in repository to hardlinks+junctions windows on local machine. How I may do this? We use a mix of Windows and Unix based OS's.
I extended Git's command list like this Git Symlinks in Windows
I read about hooks and created post-checkout hook:
#!/bin/sh
exec git rm-symlinks
It works, when I execute git checkout #branch_with_symlink, but when I do next checkout, git wrote:
error: Your local changes to the following files would be overwritten by checkout:
#path_to_symlink
Please, commit your changes or stash them before you can switch branches.
git status:
# On branch #branch_with_symlink
nothing to commit, working directory clean
git haven't pre-checkout hook, and I don't understand, how i make this convertion