12 posts CactusThemes Forum
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Has referred 1+ members
  • Won a competition
+4 more
cactusthemes says

Using BitBucket for about 2 years, satisfied.

Never heard of BitBucket before, but we will do a research :)

236 posts Marketplace Developer
  • Has collected 1+ items on Envato Market
  • Member of the Envato Team
  • Located in New Zealand
  • Has been part of the Envato Community for over 2 years
madlep Envato team says

Hi,

We are using SVN (on our own server) to manage source code and other related documents for our Wordpress Theme projects. Problem with SVN is that branches management (different versions of theme) is not straight-forward and quite slow. Merging branches is also complex. Releasing a branch is not possible (you have to export end upload to server by yourself)...

We are looking at Github. Does anyone have experiences using Github to manage your wordpress theme project? How do you prepare folder structure?

Totally use git. Github is a nice wrapper with some extra added bells and whistles. We use github for managing the marketplace codebase, and it works wonderfully. Once you go to git, you’ll wonder how you ever survived with SVN. I’ve used CVS, SVN, even ClearCase… shiver. git is much, much better than all of them. bitbucket uses mercurial, which I’ve only used a bit, but is pretty comparable with git too, and quite good from what I hear, just not as widely adopted.


My main concern is localhost development. 1. Do you work directly on Git folder or do you work on a local version, then copy into Git folder (then push to Github)?

Technically git lets you work “however you want”, but I’ll assume the bare origin repo/local checkout pattern that almost everyone uses in practice:

The “source of truth” for your team is the central git repo – github in this case. All code lives there, but you don’t work on it directly. You checkout (make an initial copy) of the code to your local dev machine, make changes to your local files, add them with git, commit them, then push them to the repo. You and other members of the team then pull each other’s changes.


2. If you work directly on Git folder, so you have to push a full copy of Wordpress to Github?

It depends on how you want to manage it. You would probably have the theme directory as it’s own git repo. That can then get checked out into a wordpress install locally that need not be in git. The checked out directory just looks like a regular directory with regular files in it (and a .git directory containing the git specific files it needs)


3. If you work on another copy for localhost, so what is the process? Copy from Git folder to localhost, then after changing, copy from localhost to Git? This is the same process we are using on SVN, and it sometimes causes code conflict or code lost

Again, it depends how you want to manage it. You could just have different branches that you checkout if you want to work on different versions of your plugin, and merge changes between them. Git makes this pretty easy.

If you’re wanting multiple copies of the project (in different wordpress versions etc), I guess you could symlink the same theme directory into place, or just have different checkouts if you wanted. You’d need to keep pushing/pulling changes though to keep them in sync. Not hard, just extra steps to manage. Git is generally pretty good at handling merge conflicts (better than SVN from memory).

You’ll still get that if you work on the same parts of the same file at the same time though. That’s unavoidable, whatever your approach


4. What happens if you want to work on older version of project? Copy to another localhost folder? (Says you are developing 3.9 version, but want to fix 3.8 version?)

Easy. Just create a branch for 3.8 and 3.9, and cherry-pick/merge changes into them from master (assuming to do main development there). Git handles this really well.


Any suggestions/shares would be appreciated. I think it will be useful for many teams :)

There’s this article http://nvie.com/posts/a-successful-git-branching-model/ that talks about one approach, but could be overkill for smaller projects/teams.

What I’d do is keep most of your development on master, then have a branch for each release you need to maintain. To release a new version, you branch from master again. Any fixes for older versions get cherry-picked from master, or made in the branch directly if they’re only applicable there.

You could also look at using feature branches and pull requests depending on how big your team is, and how much co-ordination and/or code-review you want to use.

1594 posts Chris Robinson
  • Located in United States
  • Has sold $500,000+ on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has been part of the Envato Community for over 6 years
+10 more
contempoinc says

Github, all day.

12 posts CactusThemes Forum
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Has referred 1+ members
  • Won a competition
+4 more
cactusthemes says

There’s this article http://nvie.com/posts/a-successful-git-branching-model/ that talks about one approach, but could be overkill for smaller projects/teams.

What I’d do is keep most of your development on master, then have a branch for each release you need to maintain. To release a new version, you branch from master again. Any fixes for older versions get cherry-picked from master, or made in the branch directly if they’re only applicable there.

You could also look at using feature branches and pull requests depending on how big your team is, and how much co-ordination and/or code-review you want to use.

Thanks for a very detailed answer :)

130 posts
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 100+ items on Envato Market
+3 more
TigerModules says

If you want to move away from SVN but are concered about the security of GitHub. Why don’t you run your Git on your own server. Check out the software called Gitorious http://getgitorious.com/. It is the same thing as GitHub however you can host it on your own server.

Best thing about it is Open Source.

130 posts
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 100+ items on Envato Market
+3 more
TigerModules says

Forgot to mention. We have been using Gitorious for 2 years now and have had no problems.

3699 posts Community Moderator
  • Helps us moderate the forums
  • Contributed a tutorial on Tuts+
  • Located in Netherlands
  • Made it to the Authors' Hall of Fame
+9 more
Joost Volunteer moderator says

bitbucket uses mercurial, which I’ve only used a bit, but is pretty comparable with git too, and quite good from what I hear, just not as widely adopted.

This is not true; bitbucket also supports git repositories.
Sure, they offer mercurial as an option, but most users use git.

by
by
by
by
by
by