View
483
Download
3
Category
Preview:
Citation preview
Intermediate Git: Workflows for Teams
Matt Wrather, Wrather Creative DrupalCamp LA 2015
Drupal Developer, Bon Vivant,
Man of Mystery
matt@wrathercreative.com @mwrather
(doesn’t use git)photo: slworking
CC-BY-NC-SA
We need…
• Flexibility
• Collaboration
• Recoverability
• Awesomesauce
• Impatient
• Disorganized
• Indecisive
• Insecure
We are…
Agenda
“In theory there’s no difference between theory and practice.
In practice, there is.”
—Yogi Berra
Problems with Git Flow
It’s a little intense.
“There are two kinds of people in this world—those who believe
there are two kinds of people in this world and those who are
smart enough to know better.”
—Tom Robbins Still Life with Woodpecker (2001)
Winchester Mystery House San Jose, CA
Fetch and Rebase Workflow$ git checkout -b my-feature-branch master
# work, stage, commit, repeat; then:
$ git fetch$ git rebase origin/master
$ git checkout master$ git merge origin/master
$ git merge --no-ff my-feature-branch$ git push origin master
Fetch and Rebase Workflow$ git checkout my-feature-branch$ git merge master# work, stage, commit, repeat; then:
$ git fetch$ git rebase origin/master
$ git checkout master$ git merge origin/master
$ git merge --no-ff my-feature-branch$ git push origin master
Thou Shalt Not Rebase CommitsThou Hast Pushed To a Remote Repository.
Topic Branch Workflow$ git checkout master$ git pull
$ git checkout -b topic-branch-1 master$ git checkout -b topic-branch-2 master$ git checkout -b topic-branch-3 master$ git checkout -b topic-branch-4 master
# work and push
$ git checkout -b staging master$ git merge topic-branch-1 topic-branch-2 # etc.
$ git checkout master$ git merge staging
feature/
bugfix/
release/
google-sitemapab-123-google-sitemap
DATA YOU LEFT OUT A SEMICOLON
ENGAGE FACEPALM
checkout
revert
reset
reset --hard
rebase -i
Thou Shalt Not Rebase CommitsThou Hast Pushed To a Remote Repository.
reflog
Recommended