Pro Yearly is on sale from $80 to $50! »

Git and GitHub Workflows at the Utah JUG

Git and GitHub Workflows at the Utah JUG

The Git version control system and GitHub collaboration platform offer a myriad of innovative and classic development workflow options. The wide range of opinions about these on the Internet can make it challenging to nimbly make wise Git workflow decisions for your team's next project.

In this presentation, Matthew will provide a tour of successful workflow patterns harvested from 7 years of studying and working with open source projects, small and large scale businesses, and governmental agencies employing everything from waterfall to fully agile processes. Flows will feature live demonstrations of the supporting Git and GitHub commands.

A little guidance can go a long way in helping you navigate the new world of distributed version control, and this talk will help you make informed choices of the Git features you'll use, the branching patterns you'll leverage, and the way you will integrate your chosen pattern with your team's development practices.

This presentation was given to the Utah Java Users Group on August 21st, 2014.

Bededa744012c87721d68f69342f81b0?s=128

Matthew McCullough

August 21, 2014
Tweet

Transcript

  1. Git and GitHub Workflows Information to aid your VCS and

    branching decisions ! a discussion with Matthew McCullough
  2. matthew@github.com @matthewmccull matthewmccullough !

  3. software development

  4. decisions… decisions… decisions… decisions…

  5. decisions… decisions… decisions… decisions… Platform Language IDE Process

  6. but the initial decisions are…

  7. VCS decisions ➊

  8. basis for other decisions ➊

  9. de-centralized centralized

  10. 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 ➊
  11. ➊ " " " " " " " "

  12. ➊ #

  13. ➊ $

  14. Team decisions ➋

  15. how many team members? ➋

  16. 1 team member? ➋

  17. None
  18. 1 to 5 team members? ➋

  19. None
  20. 5 to 15 team members? ➋

  21. 15 to 50 team members? ➋

  22. 50 to 150 team members? ➋

  23. 150+ team members? ➋

  24. None
  25. None
  26. None
  27. None
  28. optimization decisions ➌

  29. optimized for fast iterations? ➌ GitHub Flow

  30. None
  31. master

  32. master topic

  33. master topic

  34. master topic

  35. master topic

  36. master topic

  37. # ➌

  38. optimized for release maintenance? ➌ Git Flow

  39. 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
  40. 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
  41. command line tooling ➌

  42. ➌ #

  43. optimized for developer on-boarding ➌ atomic flow

  44. master

  45. master topic

  46. master topic

  47. master topic

  48. master topic

  49. master topic

  50. ➌ #

  51. optimized for clarity & maintenance ➌ git.git gitworkflows

  52. maint master next pu ➌

  53. ➌ #

  54. command decisions ➍

  55. $ git merge master <topic> ➍

  56. $ git revert <SHA> ➍

  57. $ git commit --amend ➍

  58. $ git pull -r ➍

  59. $ git rebase master $ git rebase -i <SHA> $

    git rebase --autosquash -i <SHA> ➍
  60. $ git merge —squash <topic> ➍

  61. $ git bisect start $ git bisect good $ git

    bisect bad $ git bisect run $ git bisect log ➍
  62. $ git reset --hard $ git reset --soft $ git

    reset --mixed ➍
  63. So what workflow should I chose Matthew?

  64. mix and match

  65. the simplest thing that works

  66. matthew@github.com @matthewmccull matthewmccullough !

  67. training@github.com training.github.com @githubtraining githubtraining !