.gitignore wildcard not working? (“LIVE-* ” pattern doesn't match “LIVE-vhost” filename)
Question
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?
Solution
Remove the blank space after the string you want to match.
OTHER TIPS
Try wildcarding the directory as well:
**/LIVE-*
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow