It sounds good in theory, but you're working against git's design. Clone is
going to grab all branches, unless you do a shallow clone, in which case you
don't get the history. Removing branches does not remove the objects from
git, in fact git is very stubborn about removing objects. They will
eventually be cleaned up by GC, but if you're after saving space, you're
going to be fighting with git a lot. If you're that concerned with space, I
would keep the deployable code in one repo, and all the "supporting docs" in
another. That would be the simplest route, in my opinion. If you're
working with binaries that don't need to be versioned, but do need to be
shared, you might want to use the downloads tab of the project to upload the
files. Keeping binaries out of the versioning system if they don't need to
be versioned is usually a good thing.
Tekkub
GitHub Tech Support
http://support.github.com/
Join us on IRC: #github on freenode.net
Discussion group: [email protected]
On Mon, Sep 21, 2009 at 3:06 PM, John W. Long <[email protected]> wrote:
>
> On Sep 21, 2009, at 4:40 PM, Tekkub wrote:
> > Yes, you'll need to clone again for each subdirectory with that
> > setup. There are ways to get git to share the space though, check
> > out git-clone's docs:
> http://www.kernel.org/pub/software/scm/git-core/docs/git-clone.html
> >
> > Basically you would clone the main repo once from GitHub, then clone
> > from your local repo using the --shared flag. After you've cloned
> > locally, you can add a remote to github so that you can push from
> > that repo.
>
> Ok, that's a good suggestion. But what if I only want one of the
> branches? For instance the deployed app doesn't need to have objects
> for the mockups and artwork. What I would really like is to be able to
> git clone a specific branch (which would create a new repo on my local
> disk and connect that branch to master).
>
> > I have a question here though... why do you want to do this? You're
> > basically going around and adding a bunch of complexity that, in the
> > end, lands you right back where you would be if you simply committed
> > everything as subdirectories in the same branch.
>
> It has a couple of advantages:
>
> 1. A more standard Rails setup (capistrano deployment would just work)
> 2. You only need to download the branches that you need (faster clone)
> 3. Branches can be added and removed to keep repo size down
>
> --
> John Long
> http://wiseheartdesign.com
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---