* How do I do this?
...
I could set up two local repositories and have a script copy things
from one to the other, but that seems inelegant to me.
I have a project that does something like this, where parts of the web
page are generated from the code (http://zzamboni.org/grabcartoons/). I
make use of the fact that untracked files stay in the directory when you
switch branches, to copy files from one to the other. Here's the
relevant target from my Makefile:
# Update the web pages branch. For developer use only
updweb:
./grabcartoons.pl --htmllist > lom.html
./grabcartoons.pl --templates | perl -pe 's!(\S+\.com)!<a
href="http://$$1/">$$1</a>!' > templates.txt
./grabcartoons.pl --help | sed '/default: /d' > usage.txt
./grabcartoons.pl --version | sed 's/^GrabCartoons version //'
> version.txt
git co gh-pages
mv lom.html templates.txt usage.txt version.txt _includes
@echo "### You are now in the gh-pages branch. Please review
and commit changes ###"
So I generate the appropriate files, switch to the gh-pages branch
(which leaves those files there, because they are untracked in both
branches), and after the switch move them to the _includes directory
(where they are tracked in the gh-pages branch). just for manual review
and check-in.
It's crude, but at least for a simple case like this, it works quite well.
--Diego
--
You received this message because you are subscribed to the Google Groups
"GitHub" group.
To post to this group, send email to github@googlegroups.com.
To unsubscribe from this group, send email to
github+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/github?hl=en.