Your SlideShare is downloading. ×
0
Towards Source Code Management <ul><ul><li>(or, why and how we're moving  </li></ul></ul><ul><ul><li>from Subversion to Gi...
What we wish to achieve <ul><li>Maintaining multiple branches </li></ul><ul><li>Release and bugtracking control </li></ul>...
How it's done <ul><li>Cloned subversion repository </li></ul><ul><ul><li>git svn clone -stdlayout https://sabu.yoga.ee/svn...
Primary principles of Git <ul><li>Each repository is a full repository </li></ul><ul><li>One repository = one blob, no str...
Basics you need <ul><li>Single-branch workflow: </li></ul><ul><ul><li>clone , <work>,  add ,  pull ,  commit ,  push </li>...
Workflow guidelines <ul><li>First thing you do – always branch. It is easier to put together than to take apart (though th...
How we manage branches <ul><li>master  =  /trunk  (2.1),  2.0_bugfixes  =  /branches/2.0_bugfixes  and  2.1_experimenting ...
Getting set up - Linux <ul><li>Put the two keys with your name I sent you a couple of days ago into your  ~/.ssh  , and if...
Getting set up – Mac OS X <ul><li>Add your RSA key as in Linux. The slight difference is that OS X Leopard comes with a ni...
Getting set up – Windows <ul><li>Make sure you have the whole putty distribution installed (  chiark.greenend.org.uk/~sgta...
cheat.errtheblog.com/s/git scribd.com/doc/3049033/gitcheatsheet
gitcasts.com/posts/setup-initialization-and-cloning
youtube.com/watch?v=8dhZ9BXQgc4
excess.org/article/2008/07/ogre-git-tutorial
book.git-scm.com
More links <ul><li>Documentation, man pages and user manual: </li></ul><ul><ul><li>http://git-scm.com/documentation </li><...
Upcoming SlideShare
Loading in...5
×

Towards Source Code Management (for Yoga.ee)

1,410

Published on

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

Published in: Spiritual, Technology
1 Comment
0 Likes
Statistics
Notes
  • Don't miss the notes, in the tab here next to the comments. They contain the most thinking I've done
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

No Downloads
Views
Total Views
1,410
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
19
Comments
1
Likes
0
Embeds 0
No embeds

No notes for slide
  • Transcript of "Towards Source Code Management (for Yoga.ee)"

    1. 1. Towards Source Code Management <ul><ul><li>(or, why and how we're moving </li></ul></ul><ul><ul><li>from Subversion to Git) </li></ul></ul><ul><ul><li>April 2009 </li></ul></ul><ul><ul><li>by Carl-Johan Sveningsson </li></ul></ul><ul><ul><li><cj.sveningsson@yoga.ee> </li></ul></ul>
    2. 2. What we wish to achieve <ul><li>Maintaining multiple branches </li></ul><ul><li>Release and bugtracking control </li></ul><ul><li>Simple change logs </li></ul><ul><li>Empowered development </li></ul>
    3. 3. How it's done <ul><li>Cloned subversion repository </li></ul><ul><ul><li>git svn clone -stdlayout https://sabu.yoga.ee/svn/yoga/<old name> <proper name> </li></ul></ul><ul><li>(Git fiddling to make remote svn branches local) </li></ul><ul><li>Pushed into gitosis repository store </li></ul><ul><li>Created some more repositories </li></ul><ul><li>Should still be possible to fetch and dcommit to subversion... </li></ul>
    4. 4. Primary principles of Git <ul><li>Each repository is a full repository </li></ul><ul><li>One repository = one blob, no structure, contents is tracked by SHA1 hash values </li></ul><ul><li>Cloning (“checkout”) = branching </li></ul><ul><li>Commits and branches apply to the whole repository, not individual files </li></ul><ul><li>A branch define a set of changes – can be moved around and applied </li></ul>
    5. 5. Basics you need <ul><li>Single-branch workflow: </li></ul><ul><ul><li>clone , <work>, add , pull , commit , push </li></ul></ul><ul><li>Pro per workflow (example) </li></ul><ul><ul><li>clone </li></ul></ul><ul><ul><li>checkout -b sometask </li></ul></ul><ul><ul><li><work> , commit , rebase -i master </li></ul></ul><ul><ul><li>checkout master , merge sometask </li></ul></ul><ul><ul><li>push origin master </li></ul></ul>
    6. 6. Workflow guidelines <ul><li>First thing you do – always branch. It is easier to put together than to take apart (though that is ok as well...) </li></ul><ul><li>Commit even if you don't have to. Tiny comments may prove essential later </li></ul><ul><li>If you keep local tracking branches, keep them clean so they can be pushed easily </li></ul><ul><li>If remote branches have advanced - fetch, rebase (interactively), merge and then push – we don't want to deal with your merge! </li></ul><ul><li>Advanced distributed workflows... </li></ul>
    7. 7. How we manage branches <ul><li>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 </li></ul><ul><li>branches to collaborate on you can push to gitosis </li></ul><ul><li>keep private branches to yourself or in your backup </li></ul><ul><li>release and testing management can keep mirror repositories in subdirectories of gitosis </li></ul>
    8. 8. Getting set up - Linux <ul><li>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 </li></ul><ul><li>Install git ( apt-get install git or corresponding for your distribution) and some sort of GUI -  qgit (  sourceforge.net/projects/qgit  ) or tig (  jonas.nitro.dk/tig ) are recommended. </li></ul><ul><li>Clone the repositories you want, branch and start working </li></ul>
    9. 9. Getting set up – Mac OS X <ul><li>Add your RSA key as in Linux. The slight difference is that OS X Leopard comes with a nice integrated ssh-agent (  dribin.org/dave/blog/archives/2007/11/28/ssh_agent_leopard ). </li></ul><ul><li>Install git ( code.google.com/p/git-osx-installer/downloads/list?can=3 - openingitgui is a non-essential script thing, ignore it) and the GitX GUI (  gitx.frim.nl ) </li></ul><ul><li>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. </li></ul>
    10. 10. Getting set up – Windows <ul><li>Make sure you have the whole putty distribution installed (  chiark.greenend.org.uk/~sgtatham/putty/download.html  ). 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. </li></ul><ul><li>Install git ( &quot;msysgit&quot; -  code.google.com/p/msysgit/downloads/list - also available for Cygwin) and the Git Windows Shell Extension GUI (  sourceforge.net/projects/gitextensions - tortoisegit is not mature!) </li></ul><ul><li>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 :-) </li></ul>
    11. 11. cheat.errtheblog.com/s/git scribd.com/doc/3049033/gitcheatsheet
    12. 12. gitcasts.com/posts/setup-initialization-and-cloning
    13. 13. youtube.com/watch?v=8dhZ9BXQgc4
    14. 14. excess.org/article/2008/07/ogre-git-tutorial
    15. 15. book.git-scm.com
    16. 16. More links <ul><li>Documentation, man pages and user manual: </li></ul><ul><ul><li>http://git-scm.com/documentation </li></ul></ul><ul><ul><li>http://www.kernel.org/pub/software/scm/git/docs/ </li></ul></ul><ul><ul><li>http://www.kernel.org/pub/software/scm/git/docs/user-manual.html </li></ul></ul><ul><li>Register on Github? My accounts are: </li></ul><ul><ul><li>http://github.com/YogaCJ </li></ul></ul><ul><ul><li>http://github.com/UncleCJ </li></ul></ul>
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×