[wp-hackers] GitHub submodule theme development?
Micky Hulse
mickyhulse.lists at gmail.com
Mon Jul 8 02:54:47 UTC 2013
So, I've made a little progress (not sure if this is of interest to anyone).
Locally, let's say I've got a WordPress project setup and it's called
"BILLY" (where WordPress core is a Git submodule).
Elsewhere on my computer, I have a theme named "FOO".
In BILLY's /content/themes/ folder, I created a symbolic link to my
local "FOO" theme repository (using XAMPP on a Mac, I've enabled
FollowSymLinks option for my VirtualHost and user/group, set in
httpd.conf, are {my-login's-user}/staff).
Now, as a local test environment, everything's working perfectly.
Nothing too complicated going on here. I dig it. :)
Moving on ...
Because I don't want to VC my themes (or, really, anything in any of
the /content/*/ folders), I've added the below to BILLY's .gitignore:
[snip]
# ... boilerplate .gitignore here ...
# Project-specific #
####################
/wp-config.php
/content/*/*
!/content/*/*.php
[/snip]
The above allows me to ignore things like "themes" and "plugins"
folders but it'll still allow me track changes to boilerplate
index.php files within those boilerplate WP folders.
>From there, I've setup a clone of BILLY on my host. Within the remote
BILLY, I've cloned "FOO" into /content/themes/ folder.
Note that the remote's theme is not a submodule; as I'm ignoring
themes in my .gitignore, I don't need to do any tracking of this theme
from BILLY.
Now that everything's setup, I'm able to independently push/pull from
local AND remote BILLY and FOO repositories (I'll mostly be going one
direction, from local to remote, but I like having the option to go
the other way).
Locally, I can make changes to FOO theme and see those changes happen
in real time (i.e. no submodule updating). Once I'm done for the day
(that is, developing my theme, locally) I can push it to GitHub, go to
the remote FOO and `git pull` the latest changes.
Of course, I'm sure this all sounds like crazy talk to all of you pro WP devs.
I know there are a lot more sophisticated tools out there to do
similar work/tasks ... The above is what makes sense to me.
If anyone is listening and/or interested, I'm open to feedback and/or
discussing my setup further. :)
Thanks again to everyone that's helped me out.
Cheers,
M
More information about the wp-hackers
mailing list