Upgrade to Pro — share decks privately, control downloads, hide ads and more …

"You've decided to Use Git as Your VCS for Your...

"You've decided to Use Git as Your VCS for Your Team...So Now What?

Slides from the presentation I gave at the php|arch Git Summit

Chris Hartjes

February 01, 2012
Tweet

More Decks by Chris Hartjes

Other Decks in Programming

Transcript

  1. “You’ve decided to Use Git as Your VCS for Your

    Team...So Now What?” Chris Hartjes -- Moontoast
  2. News feed • at a glance see who’s been doing

    things • see exactly what’s been done
  3. Access control • makes it easy to add outside contributors

    via public keys • control who has access to specific repos
  4. Web-based viewing • CLI sucks for looking at code changes

    • Tweaking of web UI always working towards smoother experience
  5. chartjes@marmalade [~/pi] -> % git checkout -b feature-git-summit Switched to

    a new branch 'feature-git-summit' chartjes@marmalade [~/pi] -> % * choose consistent naming scheme * Moontoast uses project milestone name * ALWAYS create off of master branch
  6. chartjes@marmalade [~/pi] -> % git checkout master Switched to branch

    'master' chartjes@marmalade [~/pi] -> % git checkout -b hotfix-1234-git-summit Switched to a new branch 'hotfix-1234-git-summit' chartjes@marmalade [~/pi] -> % * always named after ticket number * ALWAYS create off of master branch
  7. Merging branches chartjes@marmalade [~/pi] -> % git checkout feature-git-summit Switched

    to branch 'feature-git-summit' chartjes@marmalade [~/pi] -> % git merge --no-ff master
  8. • long-running feature branches increase risk of nasty conflicts •

    best practice is to merge master INTO feature branches EVERY time a production push occurs
  9. • updates code-in-place via ‘git pull’ • runs shell scripts

    to perform other duties • encourages practice of separate repo for configuration files for your application Whiskey Disk
  10. Other Git aware tools • Capistrano (Ruby but not Ruby

    only) • Jenkins (CI server) • Deployinator (open sourced by Etsy)
  11. Used GitHub • self-hosting Git repos requires resources • management

    tools make a huge difference • GitHub API allows for innovative solutions
  12. Branch-and-Merge • allows for parallel development • branching is a

    “cheap” behaviour • be careful with long-running branches • DON’T CROSS THE STREAMS