Slide 1

Slide 1 text

VERSION CONTROL TIPS, TRICKS & GOOD CITIZENSHIP

Slide 2

Slide 2 text

@CRATAEGUSTESS HTTPS://JOIND.IN/TALK/FA438 TESS BARNES • multi language developer • currently working for Fasthosts • tech lead • agile advocate

Slide 3

Slide 3 text

HOPEFULLY… WHAT WE WILL COVER • how good citizenship fits in • fundamentals • conflict resolution • branching • documentation • the right tool for the right reasons

Slide 4

Slide 4 text

GOOD (CODE) CITIZENSHIP WHAT’S IT ALL ABOUT?

Slide 5

Slide 5 text

EDUCATIONAL DEFINITION GOOD CITIZENSHIP Good citizens should always try to make a team-minded decision during any situation. Knowing what is right and wrong and understanding the consequences of a decision are important aspects of being a good citizen. Obeying laws and having respect for not only individuals in the community, but for the community itself, are other traits of a good citizen. Being helpful or helping those in need is another aspect of being a good citizen. from http://www.ask.com/world-view/qualities-good-citizen-5a9b527e5fe4adbc

Slide 6

Slide 6 text

WHAT’S IT GOT TO DO WITH CODE? GOOD (CODE) CITIZENSHIP • version control is the hub of a bigger system

Slide 7

Slide 7 text

WHAT’S IT GOT TO DO WITH CODE? GOOD (CODE) CITIZENSHIP • version control is the hub of a bigger system • creating something great to build on

Slide 8

Slide 8 text

WHAT’S IT GOT TO DO WITH CODE? GOOD (CODE) CITIZENSHIP • version control is the hub of a bigger system • creating something great to build on • keeping our house clean

Slide 9

Slide 9 text

WHAT’S IT GOT TO DO WITH CODE? GOOD (CODE) CITIZENSHIP • version control is the hub of a bigger system • creating something great to build on • keeping our house clean • doing what we agreed

Slide 10

Slide 10 text

WHAT’S IT GOT TO DO WITH CODE? GOOD (CODE) CITIZENSHIP • version control is the hub of a bigger system • creating something great to build on • keeping our house clean • doing what we agreed • sharing what we know

Slide 11

Slide 11 text

WHAT’S IT GOT TO DO WITH CODE? GOOD (CODE) CITIZENSHIP • version control is the hub of a bigger system • creating something great to build on • keeping our house clean • doing what we agreed • sharing what we know • inviting feedback

Slide 12

Slide 12 text

WHAT’S IT GOT TO DO WITH CODE? GOOD (CODE) CITIZENSHIP • version control is the hub of a bigger system • creating something great to build on • keeping our house clean • doing what we agreed • sharing what we know • inviting feedback • moving forward together

Slide 13

Slide 13 text

THE FUNDAMENTALS CREATING SOMETHING GREAT TO BUILD ON

Slide 14

Slide 14 text

HIGH LEVEL VIEW THE FUNDAMENTALS • version control is a keystone of good development practices

Slide 15

Slide 15 text

HIGH LEVEL VIEW THE FUNDAMENTALS • version control is a keystone of good development practices • lots of tools available, some good, some awful

Slide 16

Slide 16 text

HIGH LEVEL VIEW THE FUNDAMENTALS • version control is a keystone of good development practices • lots of tools available, some good, some awful • sharing code

Slide 17

Slide 17 text

HIGH LEVEL VIEW THE FUNDAMENTALS • version control is a keystone of good development practices • lots of tools available, some good, some awful • sharing code • integrating code

Slide 18

Slide 18 text

HIGH LEVEL VIEW THE FUNDAMENTALS • version control is a keystone of good development practices • lots of tools available, some good, some awful • sharing code • safeguarding code snapshots • integrating code

Slide 19

Slide 19 text

HIGH LEVEL VIEW THE FUNDAMENTALS • version control is a keystone of good development practices • lots of tools available, some good, some awful • sharing code • safeguarding code snapshots • integrating code • allowing easy rollback

Slide 20

Slide 20 text

THE SEQUENCE THE FUNDAMENTALS 1. separate

Slide 21

Slide 21 text

THE SEQUENCE THE FUNDAMENTALS 1. separate • refresh (1…n)

Slide 22

Slide 22 text

THE SEQUENCE THE FUNDAMENTALS 1. separate 2. change • refresh (1…n)

Slide 23

Slide 23 text

THE SEQUENCE THE FUNDAMENTALS 1. separate 2. change • refresh (1…n)

Slide 24

Slide 24 text

THE SEQUENCE THE FUNDAMENTALS 1. separate 2. change • refresh (1…n) • test (1…n)

Slide 25

Slide 25 text

THE SEQUENCE THE FUNDAMENTALS 1. separate 2. change 3. merge • refresh (1…n) • test (1…n)

Slide 26

Slide 26 text

THE SEQUENCE THE FUNDAMENTALS 1. separate 2. change 3. merge • refresh (1…n) • test (1…n)

Slide 27

Slide 27 text

THE SEQUENCE THE FUNDAMENTALS 1. separate 2. change 3. merge 4. snapshot • refresh (1…n) • test (1…n)

Slide 28

Slide 28 text

THE SEQUENCE THE FUNDAMENTALS 1. separate 2. change 3. merge 4. snapshot 5. release • refresh (1…n) • test (1…n)

Slide 29

Slide 29 text

THE SEQUENCE THE FUNDAMENTALS 1. separate 2. change 3. merge 4. snapshot 5. release • refresh (1…n) • test (1…n) • sanity check

Slide 30

Slide 30 text

HANDLING CONFLICTS DOING WHAT WE AGREED

Slide 31

Slide 31 text

HANDLING CONFLICTS • some version control tools handle this better than others

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

HANDLING CONFLICTS • some version control tools handle this better than others • some tools hide issues

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

HANDLING CONFLICTS • some version control tools handle this better than others • some tools hide issues • remember - the conflict is in the code, design or interpretation, not the tool

Slide 37

Slide 37 text

HANDLING CONFLICTS • some version control tools handle this better than others • some tools hide issues • remember - the conflict is in the code, design or interpretation, not the tool • how you branch / merge affects when, not if your conflicts occur

Slide 38

Slide 38 text

BRANCHING STRATEGIES KEEPING OUR HOUSE CLEAN

Slide 39

Slide 39 text

BRANCHING STRATEGIES DISTRIBUTED OR SINGLE SERVER origin clone 1 clone 2 clone pull fetch merge request server / repo check in check out update working copy 1 working copy 2 working copy 3

Slide 40

Slide 40 text

BRANCHING STRATEGIES IS BRANCHING CHEAP?

Slide 41

Slide 41 text

BRANCHING STRATEGIES DEVELOPER OVERLAP? HOW DO YOU FEEL ABOUT SHARING?

Slide 42

Slide 42 text

BRANCHING STRATEGIES RELEASE FOCUS OR FEATURE FOCUS v1.1 v1.2 clone / push master merge merge branch 1.1 branch 1.2 v5.1 MR MR MR master F1 F2 F3

Slide 43

Slide 43 text

BRANCHING STRATEGIES CONTINUOUS INTEGRATION master production tag live hot fix MR MR / push fetch/ pull clone1 clone 2 MR

Slide 44

Slide 44 text

BRANCHING STRATEGIES MULTIPLE DEPLOYMENT ENVIRONMENTS Production Staging Master clone1 clone2 clone3 tag live hot fix MR MR MR MR MR / push fetch / pull

Slide 45

Slide 45 text

DOCUMENTATION SHARING WHAT WE KNOW & INVITING FEEDBACK

Slide 46

Slide 46 text

THE ART OF A GOOD COMMIT MESSAGE (IMO) DOCUMENTATION • succinct, informative, meaningful, consistent, agreed

Slide 47

Slide 47 text

THE ART OF A GOOD COMMIT MESSAGE (IMO) DOCUMENTATION • succinct, informative, meaningful, consistent, agreed • could be scraped for release notes - not just version control users

Slide 48

Slide 48 text

THE ART OF A GOOD COMMIT MESSAGE (IMO) DOCUMENTATION • succinct, informative, meaningful, consistent, agreed • could be scraped for release notes - not just version control users • linked to issue and story trackers - don’t duplicate data

Slide 49

Slide 49 text

THE ART OF A GOOD COMMIT MESSAGE (IMO) DOCUMENTATION • succinct, informative, meaningful, consistent, agreed • could be scraped for release notes - not just version control users • linked to issue and story trackers - don’t duplicate data • used for code review in merge requests

Slide 50

Slide 50 text

THE ART OF A GOOD COMMIT MESSAGE (IMO) DOCUMENTATION • succinct, informative, meaningful, consistent, agreed • could be scraped for release notes - not just version control users • linked to issue and story trackers - don’t duplicate data • used for code review in merge requests • pattern enforced using commit hooks

Slide 51

Slide 51 text

ADDITIONAL THOUGHTS DOCUMENTATION • expected practices for open source (e.g. git hub templates)

Slide 52

Slide 52 text

ADDITIONAL THOUGHTS DOCUMENTATION • expected practices for open source (e.g. git hub templates) • .gitmessage encouraging why & how over ‘one liners‘
 https://robots.thoughtbot.com/better-commit-messages-with-a-gitmessage- template • what (title)

Slide 53

Slide 53 text

ADDITIONAL THOUGHTS DOCUMENTATION • expected practices for open source (e.g. git hub templates) • .gitmessage encouraging why & how over ‘one liners‘
 https://robots.thoughtbot.com/better-commit-messages-with-a-gitmessage- template • what (title) • why (link to feature)

Slide 54

Slide 54 text

ADDITIONAL THOUGHTS DOCUMENTATION • expected practices for open source (e.g. git hub templates) • .gitmessage encouraging why & how over ‘one liners‘
 https://robots.thoughtbot.com/better-commit-messages-with-a-gitmessage- template • what (title) • why (link to feature) • how (details - pitched for your audience)

Slide 55

Slide 55 text

RIGHT TOOL FOR THE RIGHT JOB MOVING FORWARD TOGETHER

Slide 56

Slide 56 text

RIGHT TOOL FOR THE RIGHT JOB •

Slide 57

Slide 57 text

NOT EVERYONE USES GIT! RIGHT TOOL FOR THE RIGHT JOB • git is distributed, prolific, popular and practically required for open source

Slide 58

Slide 58 text

NOT EVERYONE USES GIT! RIGHT TOOL FOR THE RIGHT JOB • git is distributed, prolific, popular and practically required for open source • but there’s still other tools out there… ➡ older companies and legacy projects? Subversion? ➡ proprietary code? Mercurial? ➡ c# houses? TFS?

Slide 59

Slide 59 text

RESPECT YOUR COMMUNITY RIGHT TOOL FOR THE RIGHT JOB • the first priority may not be to change version control tool

Slide 60

Slide 60 text

RESPECT YOUR COMMUNITY RIGHT TOOL FOR THE RIGHT JOB • the first priority may not be to change version control tool • choose a version control system that suits your business

Slide 61

Slide 61 text

RESPECT YOUR COMMUNITY RIGHT TOOL FOR THE RIGHT JOB • the first priority may not be to change version control tool • choose a version control system that suits your business • most importantly…

Slide 62

Slide 62 text

RESPECT YOUR COMMUNITY RIGHT TOOL FOR THE RIGHT JOB • the first priority may not be to change version control tool • choose a version control system that suits your business • most importantly… know WHY

Slide 63

Slide 63 text

No content

Slide 64

Slide 64 text

No content

Slide 65

Slide 65 text

THANK YOU FOR LISTENING TESS BARNES @CRATAEGUSTESS JOIND.IN: HTTPS://JOIND.IN/TALK/FA438