0

So I've read the principle but somehow I don't find a way of doing what I want

This is my .gitignore

*
!wp-content/*

And the wp-content folder is like this :

wp-content
  -- index.php
  -- languages/
  -- plugins/
  -- themes/

However it does not take in account the subfolder. I've seen that I shoudl use ** but it is not working either.

What is the proper way to include every file / folder under wp-content?

Baldráni
  • 5,332
  • 7
  • 51
  • 79
  • So you want to ignore everything *except* what's inside `wp-content`? Maybe this will help: http://stackoverflow.com/questions/987142/make-gitignore-ignore-everything-except-a-few-files?rq=1 – J. Titus Nov 04 '16 at 16:38
  • @J.Titus That's it, but I've read already every answer on stack and nothing seems to work properly :/ – Baldráni Nov 04 '16 at 16:43

1 Answers1

1

Please try this. Remember to negate the ignore of .gitignore also, otherwise your rules won't work:

.gitignore

/*
!.gitignore
!wp-content

This comment helped me understand what was going on.

Community
  • 1
  • 1
J. Titus
  • 9,535
  • 1
  • 32
  • 45