I am trying to use git in a Joomla project and the strategy I was thinking of was to ignore everything except a selected folders/subfolders. I tried some of the suggested methods from this answer but to no avail:
Here is what I am trying to put in the .gitignore file:
# ignore everything
*
# except mod_mymodule and com_mycomponent
!modules/mod_mymodule
!components/com_mycomponent
!templates/mytemplate
Running git status on this, git does not asks me to add any untracked files even though none of the files within the folder are currently in the repo. Am I doing something wrong or is it just not possible?