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

Moving to Git-based Version Control with Small Teams

Moving to Git-based Version Control with Small Teams

Presented on October 20, 2014 at the 2014 HighEdWeb Annual Conference in Portland, OR.

21046df3dd390a36aa6aa0db7264267c?s=128

Waylon Baumgardner

October 20, 2014
Tweet

Transcript

  1. Moving to Git-based Version Control with Small Teams Waylon Baumgardner

    Website Manager at California Baptist University ! HighEdWeb Annual Conference - Portland, OR October 20, 2014 @waylonrobert
  2. What is this presentation about?

  3. Developing a strategy for moving to version control

  4. Not an exhaustive Git how-to

  5. Who is this presentation for?

  6. Team Managers

  7. Developers

  8. Some background

  9. California Baptist University

  10. • Riverside, California • Founded in 1950 • 7,900+ students

    • 600+ employees • 150+ majors and concentrations
  11. Website managed by university’s Marketing unit

  12. Web team consists of 2 full-time employees

  13. https://www.flickr.com/photos/capcase/4970062156

  14. Why use version control?

  15. Disaster recovery

  16. Code history

  17. Code review

  18. What is Git?

  19. Developed by Linus Torvalds in 2005

  20. Open source distributed version control software

  21. How does Git work?

  22. Working Directory add files Staging Area commit files Local Repository

    push files Master Branch Remote Repository
  23. Why use Git?

  24. Actively developed

  25. Platform agnostic

  26. Robust community

  27. Branching Remote Repository Branch 1 Master Branch Branch 2

  28. Merging (adding code from one branch to another)

  29. Free

  30. What defines a small team?

  31. None
  32. None
  33. Development teams with 3 or fewer members (including armies of

    one)
  34. Development teams with part-time or outsourced developers

  35. How do I move to Git? carefully

  36. 3 Phases

  37. 1. Plan 2. Execute 3. Use

  38. 1. Plan 2. Execute 3. Use

  39. Step 1: Identify hosting platform

  40. Third-party hosts

  41. GitHub github.com Bitbucket bitbucket.org

  42. Self-host

  43. Git (source) git-scm.com GitLab about.gitlab.com

  44. Step 2: Select a Workflow

  45. Workflows drive the process

  46. Data Mikey Mouth Centralized Remote Repository Master Branch

  47. Mouth (Integration Manager) Integration Manager Local Repo 1 Mikey Local

    Repo 2 Data Remote Repository (Blessed)
  48. Feature Workflow Data Feature Branch 2 Mikey Feature Branch 1

    Mouth Feature Branch 3 Remote Repository Master Branch
  49. Other Workflows Git Flow GitHub Flow Dictator and Lieutenants Whispering

    Pines …
  50. Secret: There’s no right or wrong workflow

  51. Step 3: Identify users and roles

  52. Who gets access and what can they do?

  53. Step 4: Identify what files to commit

  54. Include files necessary for website to run

  55. Ignore all other files

  56. Pro Tip: Use a .gitignore file to ignore files

  57. 1. Plan 2. Execute 3. Use

  58. Step 1: Setup hosting

  59. Step 2: Create user accounts and setup machines

  60. Step 3: Create your repos

  61. Step 4: Implement a workflow

  62. Step 5: Push your first commit

  63. 1. Plan 2. Execute 3. Use

  64. Step 1: Commit. Commit. Commit.

  65. Step 2: Evaluate what’s working (and what’s not)

  66. Let’s review

  67. • Git is an open-source distributed VCS • Small teams

    = 3 or fewer • 3 Phases for moving to Git: • Plan (hosting, workflow, users, files) • Execute (setup, implement workflow, commit files) • Use (commit, commit, evaluate)
  68. How does my team use Git?

  69. We use Bitbucket for hosting our repos

  70. We use a version of the Feature Workflow

  71. Master branch is always clean

  72. New code is created in a feature branch

  73. Pull request created from feature branch

  74. What’s a Pull Request? A way to notify team members

    that you have pushed completed code. It’s great for code review. Not part of Git by default. GitHub and Bitbucket have integrated pull requests as a feature.
  75. Developer reviews the pull request and merges it into the

    Master Branch or declines
  76. Thank You!

  77. Any questions?

  78. Resources • GitHub: http://github.com • Bitbucket: http://bitbucket.org • Git tutorials:

    • https://www.atlassian.com/git/tutorials/ • http://git-scm.com/about • http://try.github.com • http://gitimmersion.com
  79. Key Terms • Repository (repo) = collection of files/branches •

    Local = on your computer • Remote = remotely hosted • Branch = copy of default/master branch • Master branch = default branch created in repo • Commit = action to add files to staging area for pushing • Push = uploading committed files to remote repository