代码之家  ›  专栏  ›  技术社区  ›  Theo

Git-引起警告的原因:Git属性中忽略了负面模式

  •  1
  • Theo  · 技术社区  · 7 年前

    在推送我的服务器时 post-receive hook运行一个简单的 git clone

    remote: Cloning into '/var/www/html/gitrep'...        
    remote: warning: Negative patterns are ignored in git attributes
    remote: Use '\!' for literal leading exclamation.
    
    1 回复  |  直到 7 年前
        1
  •  2
  •   zigarn    7 年前

    不要混合 gitignore gitattributes

    您的一个gitattributes文件使用了不允许的负模式。
    搜索以下文件之一:

    • .gitattributes
    • $GIT_DIR/info/attributes
    • $(git config --get core.attributesFile)
    • $XDG_CONFIG_HOME/git/attributes
    • $HOME/.config/git/attributes
    • $(prefix)/etc/gitattributes

    其中一个使用否定模式。您只需要修复它(通过调整gitattributes模型或转义惊叹号)