Git Flow WorkflowA powerful way to use GIT
Who am I?John CongdonI have specialized in ecommerce since 2001Sole developer/IT guy for bowlingball.comWebsite (ecommerce)Dropshipping IntegrationInventory management (picking/shipping)Pro shops retail POS system
What is GIT?A distributed revision control repositoryA complete copy exists with every cloneA smart way to codeWorks Great for Single developersSmall teamsLarge teams (open source teams are distributed worldwide)
I Thought This Talk Was About Git FlowWhat is Git Flow?A development model created by Vincent DriessenHe is known online as nvie(nvie.com)My personal version control storySole programmer = bad habitsWorked on live codeDidn’t have versions / fall back pointsNo idea what may have changed (good or bad)
I WAS STILL CONFUSEDI had the printout on my deskI tried desperately to follow the flowI always fell back into my old habits of editing live code (It’s just faster)
My Turning PointI wouldn’t be giving this talk without one, would I?Why Aren’t You Using Git Flow?By Jeff Kreeftmeijerhttp://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/
Let’s Get StartedInstall git& git-flowUsing BASH or ZSH?Install git& git-flow autocompletionStart a Projectgitinit creates a new git repogit flow init initializes git flowAccept the defaults. There are good reasons to do so.Most open source projects use this formatEveryone that works on your code needs to have the same settingsEvery cloned repo needs to run git flow init
Git flow featureA branch of development when working on new featuresA feature branch is created off of the develop branchYou can have many feature branches at the same timeI primarily live in feature branchesWe use Bugzilla at work as our IT request systemMy feature branch names: BugXXX-DescriptiveNameWhen finished, branch is merged back into developStart usage: git flow feature start XYZFinish usage: git flow feature finish XYZ
Git flow hotfixA branch used to fix production codeBranch is created off of masterMy hotfix branch names follow the same conventionWhen finished, branch is merged back into master and developI also use these for “mini” features or quick improvementsI do this in place of editing live code now  Start usage: git flow hotfix start XYZFinish usage: git flow hotfix finish XYZ
Git flow feature rebaseUsed to bring a feature branch up to date with developI use this on long running feature branches (major/unreleased feature)A good idea before finishing a feature branch.  Easier to solve merge conflicts this way in my opinion.Rewinds current feature, pulls in changes from develop, replays current feature.
Git flow releaseThis is an in between branchCreated from developMy release names are v0.9.XX, mostly arbitraryChanges can be made (usually release notes, updating version info, or any other change before ready for production)When finished, branch is merged into both master and develop
PHP Community ResourcesTwitter is my friendMe @johncongdonDavid Rogers @al_the_axCal Evans @CalEvansLorna Jane @lornajaneVincent Driessen @nvieTravis Swicegood @tswicegood
ReferencesThe sourcehttp://nvie.com/posts/a-successful-git-branching-model/Why Aren’t You Using Git Flow? By Jeff Kreeftmeijerhttp://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/Git Flowhttps://github.com/nvie/gitflow

Why Aren't You Using Git Flow?

  • 1.
    Git Flow WorkflowApowerful way to use GIT
  • 2.
    Who am I?JohnCongdonI have specialized in ecommerce since 2001Sole developer/IT guy for bowlingball.comWebsite (ecommerce)Dropshipping IntegrationInventory management (picking/shipping)Pro shops retail POS system
  • 3.
    What is GIT?Adistributed revision control repositoryA complete copy exists with every cloneA smart way to codeWorks Great for Single developersSmall teamsLarge teams (open source teams are distributed worldwide)
  • 4.
    I Thought ThisTalk Was About Git FlowWhat is Git Flow?A development model created by Vincent DriessenHe is known online as nvie(nvie.com)My personal version control storySole programmer = bad habitsWorked on live codeDidn’t have versions / fall back pointsNo idea what may have changed (good or bad)
  • 6.
    I WAS STILLCONFUSEDI had the printout on my deskI tried desperately to follow the flowI always fell back into my old habits of editing live code (It’s just faster)
  • 7.
    My Turning PointIwouldn’t be giving this talk without one, would I?Why Aren’t You Using Git Flow?By Jeff Kreeftmeijerhttp://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/
  • 8.
    Let’s Get StartedInstallgit& git-flowUsing BASH or ZSH?Install git& git-flow autocompletionStart a Projectgitinit creates a new git repogit flow init initializes git flowAccept the defaults. There are good reasons to do so.Most open source projects use this formatEveryone that works on your code needs to have the same settingsEvery cloned repo needs to run git flow init
  • 9.
    Git flow featureAbranch of development when working on new featuresA feature branch is created off of the develop branchYou can have many feature branches at the same timeI primarily live in feature branchesWe use Bugzilla at work as our IT request systemMy feature branch names: BugXXX-DescriptiveNameWhen finished, branch is merged back into developStart usage: git flow feature start XYZFinish usage: git flow feature finish XYZ
  • 10.
    Git flow hotfixAbranch used to fix production codeBranch is created off of masterMy hotfix branch names follow the same conventionWhen finished, branch is merged back into master and developI also use these for “mini” features or quick improvementsI do this in place of editing live code now  Start usage: git flow hotfix start XYZFinish usage: git flow hotfix finish XYZ
  • 11.
    Git flow featurerebaseUsed to bring a feature branch up to date with developI use this on long running feature branches (major/unreleased feature)A good idea before finishing a feature branch. Easier to solve merge conflicts this way in my opinion.Rewinds current feature, pulls in changes from develop, replays current feature.
  • 12.
    Git flow releaseThisis an in between branchCreated from developMy release names are v0.9.XX, mostly arbitraryChanges can be made (usually release notes, updating version info, or any other change before ready for production)When finished, branch is merged into both master and develop
  • 13.
    PHP Community ResourcesTwitteris my friendMe @johncongdonDavid Rogers @al_the_axCal Evans @CalEvansLorna Jane @lornajaneVincent Driessen @nvieTravis Swicegood @tswicegood
  • 14.
    ReferencesThe sourcehttp://nvie.com/posts/a-successful-git-branching-model/Why Aren’tYou Using Git Flow? By Jeff Kreeftmeijerhttp://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/Git Flowhttps://github.com/nvie/gitflow

Editor's Notes

  • #8 Talk about what you learned from the article. It made sense out of the image.
  • #10 Create the branch in our example. We will add the feature to return a json result
  • #11 Create the branch in our example. We will create a hotfix to normalize the input
  • #12 Before finishing our feature branch, let’s rebase to bring the hotfix into the code