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

Like this? Share it with your network

Share

Git workflows presentation

on

  • 2,449 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,449
Views on SlideShare
2,447
Embed Views
2

Actions

Likes
4
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 Presentation Transcript

  • 1. Git workflows for Drupal  projects Mack Hardy, Raphael Huefner, Smith Milner, Shawn Price @AffinityBridge
  • 2. 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. 
  • 3. What is Git, and why should you use it
      • Distributed version control system
      • Fast
      • Easy and cheap branching
      • Drupal.org uses GIT
  • 4. 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
  • 5. 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
  • 6. 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!
  • 7. 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
  • 8. from nvie.com
  • 9. https://github.com/affinitybridge/gitflowtalk/network Network Graph from GitHub
  • 10. 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; 
  • 11. 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.
  • 12. gitflow: start feature branch $ git flow feature start <featurename> rough equivalent: $ git checkout -b feature/<featurename> develop
  • 13. 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>
  • 14. gitflow: start release branch $ git flow release start <release#> rough equivalent: $ git checkout -b release/<release#> develop
  • 15. 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#>
  • 16. gitflow: start hotfix branch $ git flow hotfix start <hotfix#> rough equivalent: $ git checkout -b hotfix/<hotfix#> master
  • 17. 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#>
  • 18. Git Deployment Consolidating the work of multiple developers and preparing it for release. Always have that production ready branch.
  • 19.  
  • 20. 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
  • 21. 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.
  • 22. 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