Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在阅读这篇博文,因为我需要一个自定义 git 驱动程序来合并我的 git 存储库中的一些 json 文件。
脚本上的说明提到了编辑.git/config以添加合并以及编辑 git 属性,.gitattributes但没有提到放置实际自定义驱动程序的位置。它只是必须在$PATH吗?
.git/config
.gitattributes
$PATH
它可以存储在文件系统的任何位置。merge.<merge driver>配置选项包括一个键,将driver在调用合并驱动程序时执行。这个driver命令可以是你可以在 shell 上运行的任何东西,所以它可以是一个程序的完整路径,或者只是你的$PATH.
merge.<merge driver>
driver