SourceTree

Introduction

$ git flow init

@marcos_placona

+MarcosPlacona

Anything you do from terminal can also be done from a GUI

Pope Benedict XVI

A new feature comes in...

You decide to work on it...

marcos.placona @ HBPC0125 /d/_temp/demo/www.hostelbookers.com (develop)
$ git clone ssh://git@stash:7999/php/www.hostelbookers.com.git

Make sure you're in Master...

marcos.placona @ HBPC0125 /d/_temp/demo/www.hostelbookers.com (develop)
$ git branch
* develop
  master
$ git checkout master

Init git flow

Text

Mind you! You may not even need to do it

Start a new Feature

Name & preview

marcos.placona @ HBPC0125 /d/_temp/demo/www.hostelbookers.com (develop)
$ git flow feature start IT-19271

Get some work done

marcos.placona @ HBPC0125 /d/_temp/demo/www.hostelbookers.com (feature/IT-19271)
$ git add tests/*
$ git commit -m "Create unit tests"
$ git add controllers/*
$ git commit -m "Update controllers"
$ git add controllers/StaticController.cs
$ git commit -m "Fix a whoopsie"

Feel free to collaborate

marcos.placona @ HBPC0125 /d/_temp/demo/www.hostelbookers.com (feature/IT-19271)
$ git flow publish feature IT-19271

And when you finish...

marcos.placona @ HBPC0125 /d/_temp/demo/www.hostelbookers.com (feature/IT-19271)
$ git flow feature finish IT-19271

Don't forget to push

marcos.placona @ HBPC0125 /d/_temp/demo/www.hostelbookers.com (develop)
$ git push

Ready to release?

  • You have finished your feature
  • It's been code reviewed
  • All unit tests have passed.
  • ...
  • Time to go a version up!

Start a new Release

Name & preview

marcos.placona @ HBPC0125 /d/_temp/demo/www.hostelbookers.com (develop)
$ git flow release start 0.0.34

Specific release

Sometimes your your release gets under a stack, so you may want to specify a certain version.

marcos.placona @ HBPC0125 /d/_temp/demo/www.hostelbookers.com (develop)
$ git flow release start 0.0.34 bbfa7a47e92c8693071345d3720adc707a054a38

Time for some final touches before the release

marcos.placona @ HBPC0125 /d/_temp/demo/www.hostelbookers.com (release/0.0.34)
$ git add tests/*
$ git commit -m "Fix the mess. Back from 100% unit test fail"
$ git add controllers/*
$ git commit -m "Refactor functionality"
$ git add --all
$ git commit -m "Update version and documentation"

It's go live time!

Finish your release

Clean after yourself

marcos.placona @ HBPC0125 /d/_temp/demo/www.hostelbookers.com (0.0.34)
$ git flow release finish 0.0.34

What have we done?

  1. Picked up a feature
  2. Created a feature branch for it
  3. Collaborated with other developers on that feature
  4. Created a release once the feature had passed code review
  5. Used this release to update our version and do some final bug-fixes
  6. Cleared unused branches off remote
  7. Created a production tag for our release

Thank you!

SourceTree Introduction

By Marcos Placona

SourceTree Introduction

  • 1,577