GIT

FLOW

INIT

Oscar Vítores { @oxkhar }

Starring...


git

Branching

Merging

Git Flow

Overview



A successful Git branching model

by Vincent Driessen

Strategy

Goals

Teamwork

Deliverables

Versions

U Can't Touch This

Troubleshooter

Approaching












Centralized Repository

Centralized
gitflow

Branches

at work!

One moment, please...

Let's talk about merges

no-ff

Always merge with "--no-ff" option

Main Branches

Main branches
Master branch

master



Git


  # New repo
  git init

  # Clone repo
  git clone git@server.name:repo.git
  
Master branch

develop



Git


  # Start develop branch
  git checkout -b develop master

  

Git Flow


  # Initialize flow
  git flow init
  
Master branch

develop



Git


  # Start develop branch
  git checkout -b develop master

  

Git Flow


  # Initialize flow
  git flow init
  

Support Branches

Support Branches

feature/*

Feature branch

Git


  # Creación
  git checkout -b feature/lorem-ipsum develop

  # Finalización
  git checkout develop
  git merge --no-ff feature/lorem-ipsum
  git branch -d feature/lorem-ipsum
  git push origin develop
  

Git Flow


  # Creación
  git flow feature start lorem-ipsum

  # Finalización
  git flow feature finish lorem-ipsum
  

release/<version>

Release branch

Git


  # Creación
  git checkout -b release/v2.3.0 develop

  # Finalización
  git checkout master
  git merge --no-ff release/v2.3.0
  git tag -a v2.3.0

  git checkout develop
  git merge --no-ff release/v2.3.0

  git branch -d release/v2.3.0
  

Git Flow


  # Creación
  git flow release start v2.3.0

  # Finalización
  git flow release finish v2.3.0
  

hotfix/<version>

Hotfix branch

Git


  # Creación
  git checkout -b hotfix/v2.3.7 master

  # Finalización
  git checkout master
  git merge --no-ff hotfix/v2.3.7
  git tag -a v2.3.7

  git checkout develop
  git merge --no-ff hotfix/v2.3.7

  git branch -d hotfix/v2.3.7
  

Git Flow


  # Creación
  git flow hotfix start v2.3.7

  # Finalización
  git flow hotfix finish v2.3.7
  

Tools in action

github.com/nvie/gitflow
tecleando

Re-revisited

  • Long live at branches?

    develop fasts, pull request soon an leave a beautiful merge

  • Can I trust in "develop" code?

    All changes pass through that "dev", so ...

  • Is agile?

    ...

  • Oldiest support?

    New repositories VS support branches








Evolution

Thank you

ありがとう

Gracias








Oscar Vítores


Senior Software Engineer


Webography

A successful Git branching model
Release Management With Gitflow
Comparing Workflows


Git-flow Cheatsheet
Semantic Versioning [http://semver.org/]


A Git Workflow for Agile Teams
Branching Is Easy. So? Git-flow Is Not Agile.