Top Banner
Git Flow Workflow A powerful way to use GIT
14

Why Aren't You Using Git Flow?

May 15, 2015

Download

Technology

John Congdon

I was inspired to use GIT much more reliably after reading about Git Flow. I got a little lost until I read "Why Aren't You Using Git Flow?". I decided to do a presentation for OrlandoPHP to try and share my enthusiasm with them.

Thank you to Vincent Driessen and Jeff Kreeftmeijer for being my inspiration.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Why Aren't You Using Git Flow?

Git Flow WorkflowA powerful way to use GIT

Page 2: Why Aren't You Using Git Flow?

Who am I?John Congdon

I have specialized in ecommerce since 2001

Sole developer/IT guy for bowlingball.com

Website (ecommerce)

Dropshipping Integration

Inventory management (picking/shipping)

Pro shops retail POS system

Page 3: Why Aren't You Using Git Flow?

What is GIT?A distributed revision control repository

A complete copy exists with every clone

A smart way to code

Works Great for Single developers

Small teams

Large teams (open source teams are distributed worldwide)

Page 4: Why Aren't You Using Git Flow?

I Thought This Talk Was About

Git FlowWhat is Git Flow?A development model created by Vincent Driessen

He is known online as nvie (nvie.com)

My personal version control storySole programmer = bad habits

Worked on live code

Didn’t have versions / fall back points

No idea what may have changed (good or bad)

Page 5: Why Aren't You Using Git Flow?
Page 6: Why Aren't You Using Git Flow?

I WAS STILL CONFUSED

I had the printout on my desk

I tried desperately to follow the flow

I always fell back into my old habits of editing live code (It’s just faster)

Page 7: Why Aren't You Using Git Flow?

My Turning PointI wouldn’t be giving this talk without one, would I?

Why Aren’t You Using Git Flow?By Jeff Kreeftmeijer

http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/

John Congdon
The article talked about a git flow and showed me a tool released by nvie that made git flow super easy.
Page 8: Why Aren't You Using Git Flow?

Let’s Get StartedInstall git & git-flow

Using BASH or ZSH?Install git & git-flow autocompletion

Start a Projectgit init creates a new git repo

git flow init initializes git flow

Accept the defaults. There are good reasons to do so.

Most open source projects use this format

Everyone that works on your code needs to have the same settings

Every cloned repo needs to run git flow init

Page 9: Why Aren't You Using Git Flow?

Git flow featureA branch of development when working on new features

A feature branch is created off of the develop branch

You can have many feature branches at the same time

I primarily live in feature branches

We use Bugzilla at work as our IT request systemMy feature branch names: BugXXX-DescriptiveName

When finished, branch is merged back into develop

Start usage: git flow feature start XYZ

Finish usage: git flow feature finish XYZ

Page 10: Why Aren't You Using Git Flow?

Git flow hotfixA branch used to fix production code

Branch is created off of master

My hotfix branch names follow the same convention

When finished, branch is merged back into master and develop

I also use these for “mini” features or quick improvements

I do this in place of editing live code now

Start usage: git flow hotfix start XYZ

Finish usage: git flow hotfix finish XYZ

Page 11: Why Aren't You Using Git Flow?

Git flow feature rebase

Used to bring a feature branch up to date with develop

I 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.

Page 12: Why Aren't You Using Git Flow?

Git flow releaseThis is an in between branch

Created from develop

My release names are v0.9.XX, mostly arbitrary

Changes 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

Page 13: Why Aren't You Using Git Flow?

PHP Community Resources

Twitter is my friendMe @johncongdon

David Rogers @al_the_ax

Cal Evans @CalEvans

Lorna Jane @lornajane

Vincent Driessen @nvie

Travis Swicegood @tswicegood