Visualizing Git Workflows - scribestools.readthedocs.io · eScribis...

Post on 30-Aug-2019

38 views 0 download

Transcript of Visualizing Git Workflows - scribestools.readthedocs.io · eScribis...

eScribis GestionDeProduits-GitWorkflows-6 1

Visualizing Git Workflows

...

rwrwr

w

pr

fk

fk

Trees Commits Branches Repositories Workflows

...

rwrwr

w

pr

fk

fk

Trees Commits Branches Repositories Workflows

eScribis GestionDeProduits-GitWorkflows-6 2

...

rwrwr

w

pr

fk

fk

Trees Commits Branches Repositories Workflows

...

rwrwr

w

pr

fk

fk

Trees Commits Branches Repositories Workflows

eScribis GestionDeProduits-GitWorkflows-6 3

Workflows

Workflow = best practices + tools

init repoweb: new repogit clone https://github.com/...

init repoweb: new repogit clone https://github.com/...

pullgit pull root master

pullgit pull root master

new commit<changes>

git statusgit add -A :/git statusgit commit -am “<msg>”

new commit<changes>

git statusgit add -A :/git statusgit commit -am “<msg>”

(merge)git status<solve conflicts>

git statusgit add -A :/git commit -am “<msg>”

(merge)git status<solve conflicts>

git statusgit add -A :/git commit -am “<msg>”

pushgit push root master

pushgit push root master

no conflict merge conflict

eScribis GestionDeProduits-GitWorkflows-6 5

Choosing/Defining a workflow

- how many people ?- how fast ?- trust/skill levels ?- geographical distribution ?- high/low ceremonies ?- tool integrations ?- acceptable complexity ?- product quality factors ?- dev / maintenance ?- ...

??

eScribis GestionDeProduits-GitWorkflows-6 6

Workflows elements

- repositories- branches- merge/pull request- reviews- issues/boards- testing - continuous integration- releases

repositories

branches

reviews

pull request

7eScribis GestionDeProduits-GitWorkflows-6 7

Workflows

eScribis GestionDeProduits-GitWorkflows-6 8

Some workflows

"Private workflow" "Centralized workflows" "Feature-branch workflows" "Rebase worflow" "Hashrocket workflow" "Star wars spring workflow" "Whispering pines workflow"

"Gitflow" "GitHub flow" "GitLab flow" "Atlassian Simple Git Workflow" "Forking workflows"

...

eScribis GestionDeProduits-GitWorkflows-6 9

Private workflow

initinit

CommitCommit

master

=> https://scribestools.readthedocs.io/en/latest/github/index.html#private-workflow

eScribis GestionDeProduits-GitWorkflows-6 10

Public workflow

CloneClone

CommitCommit

PushPush

w

origin/master

noe/master

=> https://scribestools.readthedocs.io/en/latest/github/index.html#public-workflow

eScribis GestionDeProduits-GitWorkflows-6 11

Shared master workflow

CloneClone

CommitCommit

PushPush

PullPull

...

rwrw

origin/master

noe/master

ali/master

=> https://scribestools.readthedocs.io/en/latest/github/index.html#shared-master-workflow

eScribis GestionDeProduits-GitWorkflows-6 12

Feature branches workflow

CloneClone

CommitCommit

PushPush

PullPull

BranchBranch

CheckoutCheckout

MergeMerge...

rw rw

master

feature24

feature23

feature25

=> https://scribestools.readthedocs.io/en/latest/github/index.html#feature-branches-workflow

eScribis GestionDeProduits-GitWorkflows-6 13

Git flowCloneClone

CommitCommit

PushPush

PullPull

BranchBranch

CheckoutCheckout

MergeMerge...

rw rw

master

features

develop

hotfixesreleases

=> https://scribestools.readthedocs.io/en/latest/github/index.html#git-flow

eScribis GestionDeProduits-GitWorkflows-6 14

eScribis GestionDeProduits-GitWorkflows-6 15

Open source workflows

...

rwrwr

w

pr

fk

fk

Integration manager workflow

w

pr

pr

Benevolent dictator workflow

eScribis GestionDeProduits-GitWorkflows-6 16

Pull-requests / Github flow

...

rwrwr

w

pr

fk

fk

fk

ForkFork

Commit Commit

PushPush

PullPull

Pull requestPull request

DiscussDiscuss

Ask reviewAsk review

BranchBranch

Commit Commit

RemoteRemote

Discuss Discuss

MergeMerge

ReviewReview

FetchFetch

deve

lope

r w

orkf

low

inte

grat

or w

orkf

low

eScribis GestionDeProduits-GitWorkflows-6 17

https://cloud.githubusercontent.com/assets/391331/6142393/72c7ff64-b16a-11e4-9e74-5b3c468ea791.png

Pull-requests -- Overview

eScribis GestionDeProduits-GitWorkflows-6 18

Review

Tests

Commit

Discussions

Commit

Pull-requests -- Example

eScribis GestionDeProduits-GitWorkflows-6 19

Pull-requests -- Reviews

eScribis GestionDeProduits-GitWorkflows-6 20

Pull-requests -- Merge