Slide 1

Slide 1 text

Even (GIT) flow a.k.a the story of Eddie

Slide 2

Slide 2 text

Hello! I’m Antonello D’Ippolito Twitter, GitHub: @antodippo DOING -> VONQ (NL) 2

Slide 3

Slide 3 text

Even (GIT) flow | @antodippo | November 2018 Eddie and his project ➢ Eddie starts a new project, alone ➢ He decides to version with Git ➢ The project become bigger ➢ The team become bigger ➢ Which Git workflow will he use?

Slide 4

Slide 4 text

Centralized workflow

Slide 5

Slide 5 text

Even (GIT) flow | @antodippo | November 2018 Centralized workflow ➢ Good for who’s transitioning from SVN ➢ Just one branch, master ➢ Just one dev, so no conflicts

Slide 6

Slide 6 text

Even (GIT) flow | @antodippo | November 2018 Centralized workflow master

Slide 7

Slide 7 text

Even (GIT) flow | @antodippo | November 2018 Centralized workflow Conflicts! Mike

Slide 8

Slide 8 text

Even (GIT) flow | @antodippo | November 2018 Centralized workflow master local Eddie’s master ➢ Mike starts working on the repository ➢ Eddie is working on the same commit ➢ Mike pushes a new commit on master ➢ Eddie works on the same file as Mike

Slide 9

Slide 9 text

Feature branch workflow

Slide 10

Slide 10 text

Even (GIT) flow | @antodippo | November 2018 Feature branch workflow ➢ Every feature is isolated in its own branch ➢ Conflicts must be solved in feature branch ➢ When finished it will be merged in master ➢ Eddie can control what’s going on with pull requests

Slide 11

Slide 11 text

Even (GIT) flow | @antodippo | November 2018 Feature branch workflow master Mike’s feature merge/rebase pull request

Slide 12

Slide 12 text

Even (GIT) flow | @antodippo | November 2018 Feature branch workflow Application must be deployed!

Slide 13

Slide 13 text

Feature branch workflow and continuous delivery

Slide 14

Slide 14 text

Even (GIT) flow | @antodippo | November 2018 Continuous delivery workflow ➢ The application must be delivered in production in short cycles, with new features and bug fixing ➢ There will be many environments (development, staging and production) ➢ Anything on master branch must be deployable in production at anytime

Slide 15

Slide 15 text

Even (GIT) flow | @antodippo | November 2018 Continuous delivery workflow ➢ One “integration” branch for each environment (develop, stage, master) ➢ New feature (or hotfix) branches start from master ➢ A feature (or hotfix) branch can be merged in one of the integration branches ➢ When a feature (or hotfix) branch is ready for production there will be a pull request to master

Slide 16

Slide 16 text

Even (GIT) flow | @antodippo | November 2018 Continuous delivery workflow master feature develop stage merge/rebase pull request

Slide 17

Slide 17 text

Even (GIT) flow | @antodippo | November 2018 Continuous delivery workflow ➢ Start a new branch always from master? ➢ Pull requests to environment branches too? ?

Slide 18

Slide 18 text

Even (GIT) flow | @antodippo | November 2018 Continuous delivery workflow X

Slide 19

Slide 19 text

“ We will have fixed release cycle, and we will maintain n releases

Slide 20

Slide 20 text

Gitflow workflow

Slide 21

Slide 21 text

Even (GIT) flow | @antodippo | November 2018 Gitflow workflow ➢ Made popular by Vincent Driessen (nvie) ➢ Suitable for fixed releases cycle projects ➢ Specific role for each branch ○ develop and master ○ feature/hotfix branches ○ release branches ➢ Command line tool: https://github.com/nvie/gitflow

Slide 22

Slide 22 text

Even (GIT) flow | @antodippo | November 2018 Gitflow workflow master contains the release history, with tags develop contains the complete history, and it’s the integration branch for new features feature branches branch off of develop are merged back into develop

Slide 23

Slide 23 text

Even (GIT) flow | @antodippo | November 2018 Gitflow workflow release branches branch off of develop when a release is (almost) ready are merged into master and tagged when is ready hotfix branches branch off of master are merged into develop (or the release branch) are merged into master (tagging)

Slide 24

Slide 24 text

Even (GIT) flow | @antodippo | November 2018 Gitflow workflow https://medium.com/devsondevs/gitflow-workflow-continuous-integration-continuous-delivery-7f4643abb64f

Slide 25

Slide 25 text

Even (GIT) flow | @antodippo | November 2018 Mike new feature and bug fixing process: 1. Mike branches feature/new-feature off of develop 2. Mike works on his branch getting updates from develop sometimes 3. Mike submit a PR to develop and Eddie merges the PR 4. When the new release is almost ready, Eddie branches off release/1.x of develop 5. Eddie merges release/1.x to master tagging with the release number 6. After some time, Eddie report a new bug to Mike 7. Mike branches hotfix/new-bug off of master 8. Eddie merges hotfix/new-bug into master, tagging 9. Eddie merges the hotfix/new-bug into develop and release/1.x Gitflow workflow

Slide 26

Slide 26 text

Even (GIT) flow | @antodippo | November 2018 Gitflow workflow ➢ Hotfix must PR to master? ➢ Is develop a release branch? ➢ When release branches must be deleted? ?

Slide 27

Slide 27 text

“ We must open source this project!

Slide 28

Slide 28 text

Bonus: forking workflow

Slide 29

Slide 29 text

Even (GIT) flow | @antodippo | November 2018 Forking workflow ➢ Developers who wants to contribute fork the main repository, instead of cloning ➢ They start a new feature branch in their forked repository ➢ They make a PR to the original repository ➢ Eddie merges the PR in the original repository ➢ Developers pull the changes in their forked repository

Slide 30

Slide 30 text

Even (GIT) flow | @antodippo | November 2018 Thanks!