And*_*cia 5 git version-control
我知道使用 subversion 您可以将任意属性附加到每个文件。
在 Subversion 中,某些属性具有特殊含义,它们是“svn:”命名空间中的属性,但您可以将任意属性附加到文件中。
我想知道 git 或任何其他分布式版本控制系统是否支持此功能。
任何其他版本控制系统(分布式或集中式)都支持类似于 subversion 属性的东西?
最接近的事情是gitattributes
$GIT_DIR/info/attributes, .gitattributes
Run Code Online (Sandbox Code Playgroud)
文件
gitattributes
是一个简单的文本文件,它为路径名提供属性。
文件中的每一行的gitattributes
形式为:
pattern attr1 attr2 ...
Run Code Online (Sandbox Code Playgroud)
也就是说,一个模式后跟一个属性列表,用空格分隔。
当模式与相关路径匹配时,该行列出的属性将被赋予该路径