• Save
Git workflows presentation
Upcoming SlideShare
Loading in...5
×
 

Git workflows presentation

on

  • 2,327 views

This is a presentation give to the Vancouver Drupal users group about moving to GIT as a version control system for a small development team. The presentation details the workflow we settled on, and ...

This is a presentation give to the Vancouver Drupal users group about moving to GIT as a version control system for a small development team. The presentation details the workflow we settled on, and the git flow method for branch management. You can see a video of the presentation here - http://www.ustream.tv/recorded/13544036

Statistics

Views

Total Views
2,327
Views on SlideShare
2,325
Embed Views
2

Actions

Likes
3
Downloads
0
Comments
0

1 Embed 2

http://www.slideshare.net 2

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Git workflows presentation Git workflows presentation Presentation Transcript

    • Git workflows for Drupal  projects Mack Hardy, Raphael Huefner, Smith Milner, Shawn Price @AffinityBridge
    • What is a workflow? "... a  sequence of connected steps " -Wikipedia The workflow we are looking for is an efficient method to allow multiple developers to integrate working code into a project. 
    • What is Git, and why should you use it
        • Distributed version control system
        • Fast
        • Easy and cheap branching
        • Drupal.org uses GIT
    • SVN... in the beginning
      • Our SVN workflow:
        • branching is hard(er)
        • all work committed to and deployed from /trunk and release tags
        • could not commit locally, hard to work offline
        • hidden .svn folders made module updates difficult
    • The move to Git
        • All the cool kids using it
        • Seemed to solve some of our SVN pain points
        • Wasn't as easy as we'd hoped
        • Expect productivity to go down before it goes up
    • Submodules Everywhere $ git submodule add http://git.drupal.org/project/views.git sites/all/modules/contrib/views Don't forget to push all commits to your submodules!
    • Where We Landed
        • Everything in one Git repo (i.e. no Git submodules)
        • 2 long-living branches, "master" and "develop"
        • "master" is production ready all the time
        • Releases managed with tags
        • Separate "feature" or "topic" branches
    • from nvie.com
    • https://github.com/affinitybridge/gitflowtalk/network Network Graph from GitHub
    • The "gitflow" Git extension
        • Based on the previous graph
        • Project page https://github.com/nvie/gitflow
        • "water wings" or "training wheels" to stay on track
        • Command shortcuts for repetitive tasks
        • Branch naming convention &quot;<prefix>/<name>&quot; 
    • gitflow: prepare repository $ git flow init rough equivalent: $ git init # if necessary $ # do some configuration (save prefix choices) $ # if there's no &quot;develop&quot; branch yet, create one: $ git checkout -b develop master This brings you away from the master branch. You should never commit to it directly anymore.
    • gitflow: start feature branch $ git flow feature start <featurename> rough equivalent: $ git checkout -b feature/<featurename> develop
    • gitflow: finish feature branch $ git flow feature finish <featurename> rough equivalent: $ git checkout develop $ git merge --no-ff feature/<featurename> $ git branch -d feature/<featurename>
    • gitflow: start release branch $ git flow release start <release#> rough equivalent: $ git checkout -b release/<release#> develop
    • gitflow: finish release branch $ git flow release finish <release#> rough equivalent: $ git checkout master $ git merge --no-ff release/<release#> $ git tag -a <release#> $ git checkout develop $ git merge --no-ff release/<release#> $ git branch -d release/<release#>
    • gitflow: start hotfix branch $ git flow hotfix start <hotfix#> rough equivalent: $ git checkout -b hotfix/<hotfix#> master
    • gitflow: finish hotfix branch $ git flow hotfix finish <hotfix#> rough equivalent: $ git checkout master $ git merge --no-ff hotfix/<hotfix#> $ git tag -a <hotfix#> $ git checkout develop $ git merge --no-ff hotfix/<hotfix#> $ git branch -d hotfix/<hotfix#>
    • Git Deployment Consolidating the work of multiple developers and preparing it for release. Always have that production ready branch.
    •  
    • GIT and the Drupal Community
        • Drupal.org is now using GIT for version control.
        • Choosing Git for your own code means less tools to learn when also contributing to Drupal projects.
        • Git makes it easy to create and apply patches using  &quot;git diff&quot; and &quot;git apply&quot;.
      •                 http://drupal.org/node/1054616#applying-patches
    • Wrapping Up
        • This is what works for us. You may find a process that fits you better.
        • Big win for us is ability to create new branches on a whim.
        • Knowing that master is always production ready helps us sleep at night.
    • Resources http://affinitybridge.com Git Flow  https://github.com/nvie/gitflow NVIE Branching Model http://nvie.com/posts/a-successful-git-branching-model/ SVN to GIT Crash Course https://git.wiki.kernel.org/index.php/GitSvnCrashCourse