Я пытаюсь настроить файл gitignore для сайта Wordpress. Вот что я до сих пор:
# Ignore everything in the root except the "wp-content" directory.
/*
!.gitignore
!/wp-content/
# Ignore everything in the "wp-content" directory, except the "plugins"
# and "themes" directories.
/wp-content/*
!/wp-content/plugins/
!/wp-content/themes/
# Ignore everything in the "plugins" directory, except the plugins you
# specify (see the commented-out examples for hints on how to do this.)
/wp-content/plugins/*
!/wp-content/plugins/coemans-site-plugin/
# Ignore everything in the "themes" directory, except the themes you
# specify (see the commented-out example for a hint on how to do this.)
/wp-content/themes/*
!/wp-content/themes/bg-mobile-first/
Это отлично работает для папки плагинов, но добавляется только папка bg-mobile-first, а не ее содержимое. Если я заменил bg-mobile-first на другую тему в папке тем (генезис), вся папка и все в ней добавляются.
Я новичок в git, поэтому я, вероятно, очевидно, но я искал какое-то время и еще не придумал решение. Любая помощь будет высоко оценена.
Я попытался создать новое репо для другого сайта, и там он работает как ожидается, поэтому рассмотрим это закрыто.