Reputation: 2055
I have a .gitignore file which I am trying to only let git see the dirs and files in /wp-content/plugins/event-manager and /wp-content/themes/StringsV2.
The one for the theme is working but the plugin one only includes the dir and ignores all the files.
# Ignore everything in the root except the "wp-content" directory.
/*
!.gitignore
!wp-content/
!wp-config.php
# 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/event-manager/
# 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/StringsV2/
Any ideas where it is going wrong? Thanks
Upvotes: 2
Views: 954
Reputation: 2019
Try the git check-ignore to find out how git is ignoring a file/folder for example:
$ git check-ignore -v sql
found from this article: Git is ignoring files that aren't in gitignore
Upvotes: 1