Git

The

Feature

To

Hey what's up?

What we will NOT do this evening

Merge

Rebase

Have a good time chatting on branching strategies...

What we will ACTUALLY do this evening

...and drink the well known "Pepsi Free"

Github Flow

Branch

Commit

work

Open Pull Request

Discuss

Tune up

Test

Merge

feature branches

Key Points:

  • master branch is always deployable.
  • Feature branches have descriptive names (new-authentication-strategy).
  • Regularly push to the same named branch on remote.
  • Open a Pull Request for help or feedback and review.
  • Directly merge into master.
  • you should deploy immediately.

Considerations:

# Fits for cases in which you deploy several times at day.

+ Simple model.

+ Easy to understand and implement

+ Widely used.

+ Easy to sync up with current master

-  May be inconvenient when a lot of contributors works at     the same time on multiple features.

# Freedom on versioning policy.

+ Web magic stuff (auto closing issues, etc...).

What's your experience?

Fork Workflow

fork repository

Key Points:

  • The developer forks the main repository
  • The developer works locally with his new copy of the official repository.
  • Pull requests are made towards main repository.
  • The main repository maintainer pushes to main repository master branch if commits are accepted.

Considerations:

# Suitable for multiple independent teams.

+ Each new repository is completely independent.

# For projects on early state probably it's too much.

# Freedom on local branching development flow.

+ More control on privileges.

-  Working with more remotes increase learning curve at         the beginning.

Anything to share?

Twgit

TheFork

Key Points

PR1

PR2

Official

Fork

twgit feature start PFS-279

twgit feature start PFS-350

twgit release start

twgit feature merge-into-release PFS-350

twgit feature merge-into-release PFS-279

twgit release finish

twgit hotfix start

twgit hotfix finish

...Please say something...

Considerations:

# It is an enhanced mixed approach of Gitflow and Fork Workflow.

+ Automate some of maintaining chores (versions, tag,

   feature list).

+ multiple sequential Pull Request per feature may help reviews.

-  sync up with master is no that immediate

-  Doc is only in french... (Braking news! they started translating!)

-  The same problems as Fork Workflow (learning curve)

-  Commands are not so organized.

-  When init twgit cuts off all not master branches.

Wanna more?

Git Flow

Key Points

Blown your Mind?

Considerations:

# Opinionated.

+ Set of clear rule to branch

+ git plugin (ie: git flow feature start)

+ Well integrated with visual application.

- may be complicated at the beginning

- to build release changelog you have to dig in tree history   to hunt for features closed.

- With Continous Delivery hotfix and release branches are          useless.

Git Town

Key Points:

  • master branch is the main development branch (or not).
  • git hack (feature branches).
  • git sync.
  • git new-pull-request.
  • git ship.
  • that's all!
  • (optional perennial branches)
  • (nested feature branches)

Considerations:

+ Incredibly simple model.

+ high level of abstraction.

# Particularly useful at early stage of development.

+ keep clean the master branch history (and the repo itself)

-  lose the feature branches history (can be avoided).

# Not opinionated.

+ may be used with other models at the same time.

Demo Time!

Other Models

Just an overview

GitLab Flow

Gitless

dgit

Git “Wrapper” for Datasets

Any experience with these?

Questions & Answers

Thanks for watching!

Links

Git to the Feature

By Stefano Ordine

Git to the Feature

  • 627

More from Stefano Ordine