Here's my take on the whole thing...
Conceptually, the code for your program and the website for the
documentation... and extra pdfs and notes and... are all the same PROJECT so
they belong in the same REPO. However, functionally, the code does not need
to the website to function, nor does the website need the code, so they
don't belong in the same branch. Extra files could either go in another
branch, or simply be uploaded somewhere (GitHub) depending on their size and
how often they change (and therefore need to be versioned). Those
supplementary files might be something like a database backup, which you
*really* don't want in the repo... I've been there and done that, in svn,
and it was very painful. Putting everything in the repo isn't always the
best thing.
The unix perspecive... well as I see it if you want the entire project, you
should be cloning the repo anyway. A zip is only going to give you the head
commit... that's not really the entire project! Now, for packaged versions
(i.e. for compilation/installation) you'd be generating a zip or an
executable, and neither would need the web site or the supplementary
files... if it did you'd be putthing them in the main branch. Instead, I
would be generating two different zips for that, one for the code and one
for the supplementary files, so the branch design fits that better for me.
But again that's just my opinion on how to do things.
You don't necessarily have to "teach your tools about git". Take the
website-from-code generator, you simply check out your code branch, run the
script, checkout your website branch, and commit the files. I've done a
similar process across repos too (the /tg path of my user Pages repo is
generated with data from another repo entirely)... it's not as horrible as
you might think.
Oh and be warned, our todo list is very large ^^
Tekkub
GitHub Tech Support
http://support.github.com/
Join us on IRC: #github on freenode.net
Discussion group: [email protected]
On Wed, Jun 24, 2009 at 1:01 PM, trans <[email protected]> wrote:
>
>
>
> On Jun 24, 1:34 pm, Chris Wanstrath <[email protected]> wrote:
> > On Wed, Jun 24, 2009 at 1:51 AM, trans<[email protected]> wrote:
> > > I'm sorry but the Pages feature is just god awful annoying. These are
> > > my issues with it:
> >
> > > 1) Conceptually branches are intended for copies of one's project to
> > > be worked on, not a wholly different set of files.
> >
> > You should let the Git project know. They're unaware and do something
> > similar to gh-pages.
> >
> > http://github.com/git/git/tree/html
>
> Guess I'm just a purest then. I really don't like the idea at all. By
> doing that the notion of branches and directories start to meld
> together. Why not keep say pdf docs in a separate branch, how about
> examples, or developer's notes, and so on? I can understand why one
> might be inclined to do use a separate branch for webpages at first. I
> used to keep my websites in an all together separate location at one
> point. But later I realized it wasn't a big deal just to keep them
> with the project.
>
> > > 2) It is customary to keep one's website files is a subdirectory or
> > > one's project.
> >
> > It was also customary to branch rarely in Subversion. But now we have
> Git.
>
> I'm not really coming from a subversion perspective. I'm coming more
> from a unix perspective. For example, let say I want to zip up my
> whole project, easy enough right, except wait, how do I include the
> web pages? Now I got to do two zips or some other extra hoop jumping.
> Or perhaps part or all of my website is generated from my source code
> (which it is), now I have to teach my tools about git.... and so forth
> for all related activities.
>
> > > 3) Per custom, my site pages are already there, in the subdirectory.
> > > So why not just serve them up? Why waste storage space by storing
> > > another copy of them in a separate branch?
> >
> > Luckily if the files are the same, no space is wasted.
>
> If they stay in sync... something else I have to worry about.
>
> > > 4) Whenever one has to do something mind-numbing like <a href="http://
> > > github.com/drnic/sake-tasks/blob/
> > > 3152ac2eca99b97fa3bd4a2951a52064d7bd961c/github/pages/
> > > migrate_website.sake">this</a> in order to get something to work as
> > > one would expect, then you know there's room for improvement.
> >
> > I agree. Keeping your site in a gh-pages branch would eliminate the
> > need for this task.
> >
> > > I'm not asking that you get rid of the whole gh-pages branch thing --
> > > clearly some people want it that way, but perhaps you could offer the
> > > subdirectory way as an alternative? Ideally have a property to specify
> > > which directory or branch, to find site pages.
> >
> > We'll put it on the list.
>
> I realize you prefer gh-pages. That's fine by me. I'd just rather do
> it with a directory, so I really appreciate you guys putting this on
> your todo list.
>
> Thanks,
> Trans
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"GitHub" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/github?hl=en
-~----------~----~----~----~------~----~------~--~---