[wp-hackers] Switching from SVN
Eric Mann
eric at eam.me
Thu Dec 9 19:51:01 UTC 2010
The advantage of using GIT (or Mercurial, or any other distributed system)
is that you can develop and commit locally, not just to a central
repository.
Take this workflow:
- You start working on a patch for a small feature and spend a couple of
hours swimming through code
- You go out to dinner, do something else, and get wrapped up in another
project
- You come back to your patch a week later and work a bit more
- You work some more a day or two later
- Then you discover that the small feature is really a major overhaul to
an existing system, so you buckle down and work even hard
- When you're just about done, you realize you've made a mistake - adding
new feature B somehow broke feature A ... but you aren't quite sure what you
did to break it or, more importantly, when.
With SVN on a dedicated repository, it's easy to just revert changes and
track down your bug. Core committers to WordPress have access to this and
seem to use it (I see the occasional reversion ... we're not perfect). But
other developers in the community don't. And that's where Git helps. With
the current SVN system, if I stumble upon a bug and try to track down where
I broke the code, I have no revision history to track against because I'm
not actually working with the WordPress repository. With Git, though, I
have a local copy and I'm constantly committing my changes to that - if I
see something broken, I can track down a specific revision and fix it.
That's the value of Git.
Basic workflow comparison -
SVN:
- Update working copy
- Write code
- Write code
- Write code
- Export patch to someone else
- Patch accepted and committed
Git:
- Clone repository
- Write code
- Commit
- Write code
- Commit
- Write code
- Commit
- Request that someone else pulls your changes
- Changes are committed
On Thu, Dec 9, 2010 at 11:36 AM, Otto <otto at ottodestruct.com> wrote:
> On Thu, Dec 9, 2010 at 1:30 PM, Otto <otto at ottodestruct.com> wrote:
> > For the record, I don't get git. I find it confusing and difficult to
> use.
>
> BTW, I agree with nacin that this is most likely a matter of the
> associated tools just not being up to par yet. SVN has been around a
> long time, while GIT is relatively new by comparison. The tools I've
> seen to work with it are all difficult to use and the weird use of
> terminology I don't understand (because I don't understand the git
> workflow in the first place) makes them difficult and confusing. If
> the tools were better, and the terminology was explained well, then
> maybe it would make more sense to me.
>
> -Otto
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list