I have a git repository for a Joomla component that I am developing. The whole thing is set up like this:
joomla_www/
administrator/
bin/
cache/
.
.
.
MY_COMPONENT/
.
.
.
templates/
My git repo is initialized at MY_COMPONENT/.
Now we have realized that we would like to add templates/
to the repo too, which brings two problems:
1) How to move the git repo's root folder one level above. About this, I've already read this question... except that I don't understand the accepted answer (the one by Tim Henigan). I don't understand the first step (he is talking about the remote repo, not the local one, right?), and I don't understand the second step (am I supposed to move everything in MY_COMPONENT/
to the root Joomla folder... and commit from there?).
2) How to make git ignore the myriad folders that Joomla has so that it only pays attention to the two ones that I'm interested in, MY_COMPONENT
and templates/
. I know about .gitignore
, but in this case, when the majority of the contents in a folder are ones that I am NOT interested in, it's kind of a pain to have to add everything manually in it. Is there a simpler solution? Something like the opposite of .gitignore
, a file where you just put the folders you are interested in?
EDIT: I forgot to ask. After performing whatever changes in the remote git repo, what would the rest of us developers have to do to sync up? Would it be enough to do just a 'git pull'?
EDIT 2: okay, found an answer to my second question: Make .gitignore ignore everything except a few files. Now I only need some kind person to clarify the answer I found to the first one.