Upgrade to Pro — share decks privately, control downloads, hide ads and more …

git-flow: a successful branching model

git-flow: a successful branching model

Gustavo Barbosa

October 01, 2012
Tweet

More Decks by Gustavo Barbosa

Other Decks in Programming

Transcript

  1. develop master versão inicial de prod próximo release em prod

    próximo release em prod WIP para próximo release production-ready state
  2. •branch off from: develop •merge back into: develop •branching name

    convention, except: •master •develop •release-* •hotfix-*
  3. $ git checkout -b myfeature develop Switched to a new

    branch “myfeature” $ git checkout develop Switched to branch “develop” $ git merge --no-ff myfeature Updating ea1b82a..05e9557 (Summary of changes) $ git branch -d myfeature Deleted branch “myfeature” (was 05e9557). $ git push origin develop branching off merging into
  4. $ git flow feature start myfeature Switched to a new

    branch “myfeature” branching off $ git flow feature finish myfeature Switched to branch “develop” Updating ea1b82a..05e9557 (Summary of changes) Deleted branch “myfeature” (was 05e9557). merging into
  5. $ git checkout -b release-1.2 develop Switched to a new

    branch “release-1.2” $ git checkout master Switched to branch “master” $ git merge --no-ff release-1.2 Merge made by recursive. (Summary of changes) $ git tag -a 1.2 branching off merging into $ git checkout develop Switched to branch “develop” $ git merge --no-ff release-1.2
  6. $ git flow release start 1.2 Switched to a new

    branch “release-1.2” branching off $ git flow release finish 1.2 Merge made by recursive. (Summary of changes) Deleted branch “release-1.2” (was f105d3). merging into
  7. $ git checkout -b hotfix-1.2.1 master Switched to a new

    branch “hotfix-1.2.1” $ git checkout master Switched to branch “master” $ git merge --no-ff hotfix-1.2.1 Merge made by recursive. (Summary of changes) $ git tag -a 1.2.1 branching off merging into $ git checkout develop Switched to branch “develop” $ git merge --no-ff release-1.2.1
  8. $ git flow hotfix start 1.2.1 Switched to a new

    branch “hotfix-1.2.1” branching off $ git flow hotfix finish 1.2.1 Merge made by recursive. (Summary of changes) Deleted branch “hotfix-1.2.1” (was 071ab57). merging into
  9. •git-flow é mais do que precisam •deploy contínuo para produção

    (>1/dia) •a ideia de releases não importa •hotfixes ~= small features