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.
2. 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
3. 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)
4. I Thought This Talk Was About Git Flow What is Git Flow? A development model created by Vincent Driessen He is known online as nvie(nvie.com) My personal version control story Sole programmer = bad habits Worked on live code Didn’t have versions / fall back points No idea what may have changed (good or bad)
5.
6. 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)
7. My Turning Point I 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/
8. Let’s Get Started Install git& git-flow Using BASH or ZSH? Install git& git-flow autocompletion Start a Project gitinit 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
9. Git flow feature A 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 system My 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
10. Git flow hotfix A 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
11. 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.
12. Git flow release This 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
13. PHP Community Resources Twitter is my friend Me @johncongdon David Rogers @al_the_ax Cal Evans @CalEvans Lorna Jane @lornajane Vincent Driessen @nvie Travis Swicegood @tswicegood
14. References The source http://nvie.com/posts/a-successful-git-branching-model/ Why Aren’t You Using Git Flow? By Jeff Kreeftmeijer http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/ Git Flow https://github.com/nvie/gitflow
Notas del editor
Talk about what you learned from the article. It made sense out of the image.
Create the branch in our example. We will add the feature to return a json result
Create the branch in our example. We will create a hotfix to normalize the input
Before finishing our feature branch, let’s rebase to bring the hotfix into the code