Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.gitignore wildcard not working? ("LIVE-* " pattern doesn't match "LIVE-vhost" filename)

Tags:

git

gitignore

Super quick one. Here is my .gitignore (at the root level of my repo

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

When I do this, The LIVE-* bit isn't working:

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

What am I doing wrong?

like image 251
bobinabottle Avatar asked Oct 26 '10 05:10

bobinabottle


2 Answers

Remove the blank space after the string you want to match.

like image 89
Ronald Avatar answered Oct 06 '22 00:10

Ronald


Try wildcarding the directory as well:

**/LIVE-*
like image 37
Clinton Avatar answered Oct 05 '22 23:10

Clinton