[wp-hackers] Using Git for tracking multiple disparate sites
Scott R. Godin
scottg.wp-hackers at mhg2.com
Tue Jan 26 20:20:10 UTC 2010
On 01/26/2010 02:23 PM, Potkanski, Jason wrote:
> We use a bash script to export from subversion, then rsync to force it over. This is part of our script that might help you out:
>
> -rv -delete is to force removal of any files and recurse down the directory structure.
> -dv is to just update the files in that directory but not delete or recurse down the directories. (So we don't nuke wp-config.php or .htaccess)
>
> We use WPMU, but this is probably easily adapted for WP.
>
> mudirs=( foo bar zig zag )
>
> rm -rf ~/wpmu
> svn export https://SVN.REPO/source ~/wpmu
> for name in ${mudirs[@]}
> do
> echo Syncing $name
> rsync -rv --delete ~/wpmu/wp-content/mu-plugins/ /wordpress/$name/wp-content/mu-plugins/
> rsync -rv --delete ~/wpmu/wp-content/plugins/ /wordpress/$name/wp-content/plugins/
> rsync -rv --delete ~/wpmu/wp-content/themes/ /wordpress/$name/wp-content/themes/
> rsync -rv --delete ~/wpmu/wp-content/upgrade/ /wordpress/$name/wp-content/upgrade/
> rsync -rv --delete ~/wpmu/wp-admin/ /wordpress/$name/wp-admin/
> rsync -rv --delete ~/wpmu/wp-includes/ /wordpress/$name/wp-includes/
> rsync -dv ~/wpmu/ /wordpress/$name/
> rsync -dv ~/wpmu/ /wordpress/$name/wp-content/
> done
>
It's not a bad idea. I already use rsync as often as possible to keep my
development copies synced with the live servers, and do a good deal of
my devel testing on a localhost-only install of Apache on my linux box.
However, I've seen some other methods that involve git that seem to make
a bit more sense, for example:
http://www.md1clv.com/2008/04/keeping-wordpress-up-to-date-using-git/ is
a very clean idea-wise way to pull in changes
I've seen a few other variations on this theme, but both involve using
the distributed nature of git to assist in the process. local repo, repo
on server, and push/pull between them
however my questions here in the original post are less about this part
of it, and more about the internal nature of wordpress changes and using
git to manage them during a merge.
when three wordpress files disappear out of the tree in the new version
and four new files are added, functionality changes, etc. what problems
have those of you using git, run into doing merges and/or rebases to
keep your clients sites revision-controlled and updated?
--
(please respond to the list as opposed to my email box directly,
unless you are supplying private information you don't want public
on the list)
More information about the wp-hackers
mailing list