0

I have built and maintain many themes for various clients. I'd like to be able to put them all in github for lovely version control. However github gets a bit expensive when you have over 20 private repositories. I'm going to have about 30+. The themes are not used together, each one is for a separate client.

I know I can host my own git install, but then I lose the great diff tools and social aspects of github. It's also nice to have all your code in one place.

So I'm wondering if there is another way to put all themes in one repo and separate them in some intelligent way.

I thought about using gitignore, but then for each clone, you need to reconstruct the correct .gitignore. not workable.

Maybe using branches is the right approach, but I'm unfamiliar with how that would work.

One other aspect, I've been using deployhq.com (a great service) to deploy the changed files via ftp to the servers. And it's working great. And for site still in development I create a git service hook and after each push, the project gets deployed automatically by deployhq - awesome.

Any advice about how to accomplish this via branches, or via any other method?

  • I don't think branches would be relevant here. Why don't you just use subfolders? – julien_c Jan 12 '12 at 18:47
  • 1
    Pay those guys some money for their fantastic service. With 30 themes you should be able to do that. – fuxia Jan 12 '12 at 19:02
  • @julien_c, woudn't sub folders have the same problem with .gitignore like I described. wouldn't each new clone download ALL the themes? – dwenaus Jan 12 '12 at 19:15
  • @toscho, I just send them an email asking for pricing above 20 repos. I'm fine paying for good service and supporting great things like github, but I don't want to be paying $40/month just so I can host lots of tiny low volume repos. I already pay $12 and I'm fine with that. – dwenaus Jan 12 '12 at 19:17
1
  1. You have to use branches (git can clone single branch from repo) in case if you'll stick with Github
  2. If you can think about using hosted Git outside Github, you can select Assembla with Git and, f.e, Starter Plan ($9), it which you'll get one (private) space and unlimited independent repos in space
  • there are certainly a lot of alternatives to github: alternativeto.net/software/github I like the look of codebase, assembla is also pretty good. – dwenaus Jan 13 '12 at 5:15
  • Can you expand a bit on the use of branches, what would be the downsides if any and what would be the workflow. Much appreciated. – dwenaus Jan 14 '12 at 14:09
  • @dwenaus - The very best git explanation in the world can be found here: atlassian.com/en/git/workflows – leymannx Jun 2 '14 at 14:09
0

As of 2019 GitHub now offers unlimited private repos and unlimited public repos in its free plan for individual users. See https://github.com/pricing. Apart from that Bitbucket and GitLab.com both offer unlimited private repos as well.

That said I wouldn't recommend putting multiple themes into one single repo. State of the art is to use Git Flow (see the famous git-flow cheatsheet) or some similar approach that lets you have one develop branch in which pull requests get merged and when time is ready a release is made which will get merged into a master branch together with a version tag.

Imagine that flow now with multiple themes. You'd need multiple develop and master branches, one for each theme. And you'd also need custom tags for every theme, since every tag must be unique, means you can't tag 1.0.0 in more than one branch. Though this still might be a way to go if you are OK with it. Just get familiar with Git branching, create a new branch git checkout -b foo and commit your "foo theme", then create another branch git checkout -b bar and commit your "bar theme". Maybe this resource might be a little helper then: https://github.com/Kunena/Kunena-Forum/wiki/Create-a-new-branch-with-git-and-manage-branches


You might also consider checking out CircleCI which offers 1000 free build minutes per month (actually it's 250 per week) per user for private repos. If it's just for theme deployment it will be really difficult to hit that limit quickly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.