16

超级快的一个。这是我的 .gitignore (在我的仓库的根级别

# 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)

我究竟做错了什么?

4

2 回答 2

27

删除要匹配的字符串后面的空格。

于 2011-12-30T01:49:41.770 回答
8

尝试通配目录:

**/LIVE-*
于 2010-10-26T05:56:52.500 回答