用于在Windows上进行符号链接转换的Git挂钩

我尝试在 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

相关文章

Windows2012R2备用域控搭建 前置操作 域控主域控的主dns:自...
主域控角色迁移和夺取(转载) 转载自:http://yupeizhi.blo...
Windows2012R2 NTP时间同步 Windows2012R2里没有了internet时...
Windows注册表操作基础代码 Windows下对注册表进行操作使用的...
黑客常用WinAPI函数整理之前的博客写了很多关于Windows编程的...
一个简单的Windows Socket可复用框架说起网络编程,无非是建...