Slide 1

Slide 1 text

Git and GitHub Workflows Information to aid your VCS and branching decisions ! a discussion with Matthew McCullough & Allen Smith

Slide 2

Slide 2 text

[email protected] @matthewmccull matthewmccullough !

Slide 3

Slide 3 text

[email protected] @loranallensmith loranallensmith !

Slide 4

Slide 4 text

VCS decisions ➊ Optimization decisions ➌ Team decisions ➋ Command decisions ➍

Slide 5

Slide 5 text

software development

Slide 6

Slide 6 text

Slide 7

Slide 7 text

➊ "

Slide 8

Slide 8 text

decisions… decisions… decisions… decisions…

Slide 9

Slide 9 text

decisions… decisions… decisions… decisions… Platform Language IDE Process

Slide 10

Slide 10 text

but the initial decisions are…

Slide 11

Slide 11 text

VCS decisions ➊ Optimization ➌ Team ➋ Command ➍

Slide 12

Slide 12 text

basis for other decisions ➊

Slide 13

Slide 13 text

de-centralized centralized

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

easy to use but flexible beyond measure

Slide 16

Slide 16 text

local first but ready to connect

Slide 17

Slide 17 text

1 team member?

Slide 18

Slide 18 text

1 to 5 team members?

Slide 19

Slide 19 text

remote connections are easy

Slide 20

Slide 20 text

lightning fast local operations

Slide 21

Slide 21 text

free as in beer

Slide 22

Slide 22 text

‐‐‑‑‏‎‏‎ ⡤ ⡣

Slide 23

Slide 23 text

Git and GitHub Workflows GitHub Flow Git Flow Rebase It Squash It Linear Fast iterations Git Project Workflow Flow Types Aims Long-lived release branches Maintenance Commands rebase master merge --squash rebase -i commit —amend pull -r bisect Easy regression discovery Developer on boarding Continuous Integration Build all branches Version Control UI Handles rebased branches? Triggers UI updates on merges? Pull Requests Commit keywords: “fixes #22” revert Setting up jobs Push branch to production Chatops Deploying to branches Reverse merges merge master topic Deployments API GitHub Releases API Semantic versioning best practices Teams Solo 1-5 5-15 15-50 50-150 150+ reset --hard reset --soft rebase --autosquash -i GitHub Deployments API Centralized Decentralized ➊

Slide 24

Slide 24 text

branching is cheap

Slide 25

Slide 25 text

➊ # # # # # # # #

Slide 26

Slide 26 text

Git and GitHub Workflows GitHub Flow Git Flow Rebase It Squash It Linear Fast iterations Git Project Workflow Flow Types Aims Long-lived release branches Maintenance Commands rebase master merge --squash rebase -i commit —amend pull -r bisect Easy regression discovery Developer on boarding Continuous Integration Build all branches Version Control UI Handles rebased branches? Triggers UI updates on merges? Pull Requests Commit keywords: “fixes #22” revert Setting up jobs Push branch to production Chatops Deploying to branches Reverse merges merge master topic Deployments API GitHub Releases API Semantic versioning best practices Teams Solo 1-5 5-15 15-50 50-150 150+ reset --hard reset --soft rebase --autosquash -i GitHub Deployments API Centralized Decentralized ➊

Slide 27

Slide 27 text

➊ $

Slide 28

Slide 28 text

➊ "

Slide 29

Slide 29 text

VCS ➊ Optimization ➌ Team decisions ➋ Command ➍

Slide 30

Slide 30 text

how many team members? ➋

Slide 31

Slide 31 text

1 team member? ➋

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

1 to 5 team members? ➋

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

5 to 15 team members? ➋

Slide 36

Slide 36 text

15 to 50 team members? ➋

Slide 37

Slide 37 text

50 to 150 team members? ➋

Slide 38

Slide 38 text

150+ team members? ➋

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

VCS ➊ Optimization decisions ➌ Team ➋ Command ➍

Slide 44

Slide 44 text

optimized for fast iterations? ➌ GitHub Flow

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

master

Slide 47

Slide 47 text

master topic

Slide 48

Slide 48 text

master topic

Slide 49

Slide 49 text

master topic

Slide 50

Slide 50 text

master topic

Slide 51

Slide 51 text

master topic

Slide 52

Slide 52 text

$ ➌

Slide 53

Slide 53 text

optimized for release maintenance? ➌ Git Flow

Slide 54

Slide 54 text

Time release branches master develop hotfixes feature branches Feature for future release Major feature for next release Severe bug fixed for production: hotfix 0.2 Tag 0.1 Tag 0.2 Incorporate bugfix in develop

Slide 55

Slide 55 text

Tag 1.0 From this point on, “next release” means the release after 1.0 Bugfixes from rel. branch may be continuously merged back into develop Only bugfixes! 1.0

Slide 56

Slide 56 text

command line tooling ➌

Slide 57

Slide 57 text

➌ $

Slide 58

Slide 58 text

optimized for developer on-boarding ➌ atomic flow

Slide 59

Slide 59 text

master

Slide 60

Slide 60 text

master topic

Slide 61

Slide 61 text

master topic

Slide 62

Slide 62 text

master topic

Slide 63

Slide 63 text

master topic

Slide 64

Slide 64 text

master topic

Slide 65

Slide 65 text

➌ $

Slide 66

Slide 66 text

optimized for clarity & maintenance ➌ git.git gitworkflows

Slide 67

Slide 67 text

Slide 68

Slide 68 text

maint master next pu ➌

Slide 69

Slide 69 text

➌ $

Slide 70

Slide 70 text

VCS ➊ Optimization ➌ Team ➋ Command decisions ➍

Slide 71

Slide 71 text

$ git checkout master $ git merge ➍

Slide 72

Slide 72 text

$ git checkout master $ git merge ➍

Slide 73

Slide 73 text

$ git revert ➍

Slide 74

Slide 74 text

$ git commit --amend ➍

Slide 75

Slide 75 text

$ git rebase -i ➍

Slide 76

Slide 76 text

$ git merge --squash ➍

Slide 77

Slide 77 text

$ git bisect start $ git bisect good $ git bisect bad $ git bisect run $ git bisect log ➍

Slide 78

Slide 78 text

$ git reset --hard ➍

Slide 79

Slide 79 text

communication creativity

Slide 80

Slide 80 text

So what workflow should I chose?

Slide 81

Slide 81 text

mix and match

Slide 82

Slide 82 text

the simplest thing that works

Slide 83

Slide 83 text

[email protected] @matthewmccull matthewmccullough !

Slide 84

Slide 84 text

[email protected] @loranallensmith loranallensmith !

Slide 85

Slide 85 text

[email protected] training.github.com @githubtraining githubtraining !

Slide 86

Slide 86 text

No content