【问题标题】:.gitignore wildcard not working? ("LIVE-* " pattern doesn't match "LIVE-vhost" filename).gitignore 通配符不起作用? (“LIVE-*”模式与“LIVE-vhost”文件名不匹配)
【发布时间】:2010-10-26 05:53:11
【问题描述】:

超级快的。这是我的 .gitignore(在我的 repo 的根级别

# Makefile stuff
LIVE-* 
.install-post-all

当我这样做时,LIVE-* 位不起作用:

$ git status
# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#   pm-h8/etc/apache2/conf.d/LIVE-vhost
nothing added to commit but untracked files present (use "git add" to track)

我做错了什么?

【问题讨论】:

    标签: git gitignore


    【解决方案1】:

    去掉要匹配的字符串后面的空格。

    【讨论】:

      【解决方案2】:

      也可以尝试使用通配符:

      **/LIVE-*
      

      【讨论】:

      • 不,仍然没有运气:(还有其他想法吗?这个让我很难过
      猜你喜欢
      • 2017-11-02
      • 1970-01-01
      • 2019-10-12
      • 2011-03-19
      • 2013-07-20
      • 2010-10-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多