我尝试在
Windows上制作git hooks,自动将位于存储库中的unix符号链接转换为本地机器上的hardlinks junctions窗口.我怎么可能这样做?我们使用基于Windows和Unix的操作系统.
我扩展了Git的命令列表,如Git Symlinks in Windows
我读了关于钩子并创建了post-checkout钩子:
#!/bin/sh exec git rm-symlinks
它可以工作,当我执行git checkout #branch_with_symlink时,但当我做下一次checkout时,git写道:
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状态:
# On branch #branch_with_symlink nothing to commit,working directory clean
git没有预先签出钩子,我不明白,我是如何进行这种转换的
解决方法
您可以尝试使用涂抹过滤器,而不是使用钩子.它们更适合改变文本文件的内容而不是符号链接,但我认为你可以让它们起作用.
这里的一些文档:http://git-scm.com/docs/gitattributes#__code_filter_code