RSS

Bloggers

Dave Tosh
Co-founder/Product Lead
All posts
Twitter

Brett Profitt
Lead Developer
All posts
Twitter

Nick Whitt
Web Services
All posts
Twitter

Cash Costello
Community contributor
All posts
Twitter

Richard Owen
Business Development
All posts

Search

Blog tagcloud

    Welcome to the Elgg news blog

    This is the best place to keep up to date with developments around the Elgg project.


    Jan
    22nd
    by
    Nick Whitt

    Distributed Version Control With Git

    Developers, ever use Git? Git, like Subversion, is a (distributed) version control system: a way to track changes across each of your files, forever. Just as Subversion was a leap ahead of CVS, Git surpasses Subversion, particularly in regards to branching and merging.

    Subversion branching is a cumbersome process at best: "svn copy" commands are executed at some revision number, which you must keep track of for later merging. Any time you port trunk changes into your branch, you have to again carefully note from X to Y revision. Add to the mix multiple developers each with their own branches and maintenance becomes a nightmare.

    Your Git repository, however, is itself a branch of the original project! Each developer has a full copy of the entire project, including file history, in their local branch. (This is what makes Git "distributed".) Commits to your branch are all local. You can queue up as many commits as you want, even while offline, before merging your changes back to the remote repository. A single "git push" command is all that is needed to take care of all merging at this point; no need to remember revision numbers or paths!

    Worried about navigating through all these distributed branches and commits? No need: Git comes with powerful command line and graphic tools already built into your repository. If that's not enough, check out GitHub for (potentially) free hosting space. You might even notice that Elgg is already hosted here. That's right, all Elgg trunk commits go into both Subversion and Git!

    To learn more about Git, I strongly recommend checking out the Pro Git book by Scott Chacon. It's released under a Creative Commons license, meaning it's absolutely free to read online!

    Lazy Badger 45 days ago

    Nick, you aren't completely correct and fair at least twice
    1. Git merging can be (!) nightmare. Example - here, for beginning http://hans.fugal.net/blog/2008/11/10/git-push-is-worse-than-worthless/ - "git-push is worse than worthless" are not my words. Even reading (and counting size of) man page for git-push http://www.kernel.org/pub/software/scm/git/docs/git-push.html drive me nuts naturally
    2. If you tells about GUI for git (because nobody can fully read help for "git log"), why you manupulate user's attention and tells about SVN cli-interface? Merging branches in TortoiseSVN help described by one screenshot and one para of text
    More:
    * You can forgot about revision number, when you branched code, svn log --stop-on-copy in branch WC will stop on first branch revision, same for TortoiseSVN "Show Log " with enabled "stop on copy-rename" and you'll SEE it
    * SVN 1.6.* have "magic merge", i.e if continuous integration used and you often merge trunk->branch, you HAVE NOT to remember last merged revision - svn store it in svn: keywords

    Both git (and other, more natural DCVS) and SVN have own Pro and Contra, but "hard branching|merging" in subversion is more myth, than reality

    SY, tried to be objective long-time user of different SCM

    Please note that development support requests will be deleted. If you are looking for Elgg community support, head over to http://community.elgg.org