Towards Source Code Management (for
Upcoming SlideShare
Loading in...5

Like this? Share it with your network


Towards Source Code Management (for

Uploaded on

The basics of our transition from Subversion to Git is done, and as far as I can tell it's working splendidly ...

The basics of our transition from Subversion to Git is done, and as far as I can tell it's working splendidly

Anyway, there are a number of intangible aspects of making such a transition which I wanted to share with the community, so hope you enjoy the presentation

More in: Spiritual , Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
  • Don't miss the notes, in the tab here next to the comments. They contain the most thinking I've done
    Are you sure you want to
    Your message goes here
    Be the first to like this
No Downloads


Total Views
On Slideshare
From Embeds
Number of Embeds



Embeds 1 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide


  • 1. Towards Source Code Management
      • (or, why and how we're moving
      • from Subversion to Git)
      • April 2009
      • by Carl-Johan Sveningsson
      • <>
  • 2. What we wish to achieve
    • Maintaining multiple branches
    • Release and bugtracking control
    • Simple change logs
    • Empowered development
  • 3. How it's done
    • Cloned subversion repository
      • git svn clone -stdlayout<old name> <proper name>
    • (Git fiddling to make remote svn branches local)
    • Pushed into gitosis repository store
    • Created some more repositories
    • Should still be possible to fetch and dcommit to subversion...
  • 4. Primary principles of Git
    • Each repository is a full repository
    • One repository = one blob, no structure, contents is tracked by SHA1 hash values
    • Cloning (“checkout”) = branching
    • Commits and branches apply to the whole repository, not individual files
    • A branch define a set of changes – can be moved around and applied
  • 5. Basics you need
    • Single-branch workflow:
      • clone , <work>, add , pull , commit , push
    • Pro per workflow (example)
      • clone
      • checkout -b sometask
      • <work> , commit , rebase -i master
      • checkout master , merge sometask
      • push origin master
  • 6. Workflow guidelines
    • First thing you do – always branch. It is easier to put together than to take apart (though that is ok as well...)
    • Commit even if you don't have to. Tiny comments may prove essential later
    • If you keep local tracking branches, keep them clean so they can be pushed easily
    • If remote branches have advanced - fetch, rebase (interactively), merge and then push – we don't want to deal with your merge!
    • Advanced distributed workflows...
  • 7. How we manage branches
    • master = /trunk (2.1), 2.0_bugfixes = /branches/2.0_bugfixes and 2.1_experimenting = /branches/2.1_experimenting must be pushed to gitosis as soon as you change them
    • branches to collaborate on you can push to gitosis
    • keep private branches to yourself or in your backup
    • release and testing management can keep mirror repositories in subdirectories of gitosis
  • 8. Getting set up - Linux
    • Put the two keys with your name I sent you a couple of days ago into your ~/.ssh , and if it's not already there, ln -s ~/.ssh/<yourname>.pem ~/.ssh/id_rsa . You want to make sure that it is being accessed by your ssh, so if you don't have an ssh-agent running ( echo $SSH_AUTH_SOCK  ?) you may want to start that and ssh-add your ~/.ssh/id_rsa
    • Install git ( apt-get install git or corresponding for your distribution) and some sort of GUI -  qgit (  ) or tig ( ) are recommended.
    • Clone the repositories you want, branch and start working
  • 9. Getting set up – Mac OS X
    • Add your RSA key as in Linux. The slight difference is that OS X Leopard comes with a nice integrated ssh-agent ( ).
    • Install git ( - openingitgui is a non-essential script thing, ignore it) and the GitX GUI ( )
    • Clone the repositories you want. tig also runs on OS X, but otherwise you're pretty much stuck still doing most operations from the command line in OS X.
  • 10. Getting set up – Windows
    • Make sure you have the whole putty distribution installed (  ). Load your private key into puttygen and save it in the putty ppk format (you can also use puttygen to change your password if you want to). Start pageant ssh-agent and add your ppk key to it.
    • Install git ( &quot;msysgit&quot; - - also available for Cygwin) and the Git Windows Shell Extension GUI ( - tortoisegit is not mature!)
    • Clone the repositories with the git extensions by right-clicking on a folder, but beware of minor bugs such as that you have to click on an existing folder to clone, but then you can't clone into existing directories :-)
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16. More links
    • Documentation, man pages and user manual:
    • Register on Github? My accounts are: