Git Workflow Comparisons

Hello Adrian

Types of Git Workflows

Centralized

Fork & Merge

Gitflow

Centralized Workflow

centralized workflow image

yes, similar to Subversion

Quick SVN branching example

svn branch example wat

Centralized workflow in a nutshell

clone. code & commit. push.

Again, but with examples

git clone git@github.com:your_username/your_repo.git

git add some_file

git commit

git push origin master

Except, you probably work in a team

clone. code & commit. rebase. push.

Again, but with rebase

git clone git@github.com:your_username/your_repo.git

git add some_file

git commit

git pull --rebase origin master

git push origin master

Fork & Merge

fork & merge image

Fork & merge workflow in a nutshell

fork. clone. code & commit. push. pull request.

Some benefits

forking gives a "clean" environment

pull requests give a nice way to discuss code

And a note on forking

forking is all done in a UI.

supported by: github, gitlab, stash/bitbucket

Gitflow

gitflow image

Gitflow notes

master mirrors production

feature branches branch off of develop

release branches branch off of develop with features not yet in master

hotfix branches branch off of master

Gitflow notes continued ...

release branches merge back into master and develop

hotfix branches also merge back into master and develop

Gitflow in a nutshell [feature]

clone.

create feature/{xyz} branch off of develop.

code & commit.

pull request to merge into develop.

Gitflow in a nutshell [release]

create release/{version_number} branch off of develop.

qa & bugfix

merge into develop AND master.

Like branches?

gitflow image

Takeaways

use what works best for _your_ development cycle

these workflows are guidelines, not strict rules

Takeaways continued...

Extra Reading Material

Gitflow
http://nvie.com/posts/a-successful-git-branching-model/

Atlassian git workflow tutorials
https://www.atlassian.com/git/tutorials/comparing-workflows/

thanks! cheers!

Adrian Cruz / @drincruz

Slides: http://bit.ly/1Emb8co