Skip to content

Commit Merge Checklist

Lance Hunter edited this page Mar 13, 2018 · 4 revisions

Branch diagram:

Master
|
v
Dev---->Staging---->Deploy
^
|
|
|-->Feature
......^
......|
......v
.....You

NOTE:

  • Create a separate personal feature branch for every different feature you are working. Don't accidentally let partially-completed code for feature A end up in feature B's branch!

Creating a personal branch:

  1. Is there already a feature branch for the feature you're working on? If so, go to step 9.
  2. git checkout dev
  3. git pull
  4. git checkout -b (feature branch name)
  5. Make one small change.
  6. git add .
  7. git commit -m "First commit for (feature branch name)
  8. git push origin (feature branch name)
  9. git checkout -b (personal branch off feature name)
  10. Make one small change.
  11. git push origin (personal branch off feature name)

Committing to your personal branch:

  • Do it all the time. Go nuts.
  • Be sure to push every commit.

Merging from feature branch to your personal branch

  • Do this at the beginning of the day, or any time someone working from the same feature branch reports a big breakthrough/change in your feature branch's code.
  1. git checkout (feature branch)
  2. git pull
  3. git checkout (your branch)
  4. git merge (feature branch)
  5. git push origin (your branch)
  • NOTE: You are responsible for handling any merge conflicts. (If presented with a choice between code from the feature branch and code from your branch, try to select from feature branch unless you know that code is wrong/outdated.)

Merging from your personal branch to your feature branch

  1. First, run any tests for your feature. Make sure they pass (if they aren't passing and you think it's the test's fault, consult the test-writer to double-check).
  2. Talk to the Merge-Master. He'll make sure no one else is trying to merge to the same branch at the same time. He'll also let you know if any merges have happened since you last pulled that branch.
  3. Get the go-ahead from the Merge-Master
  4. git checkout (feature branch)
  5. git merge (your branch) (If there are any merge conflicts, consult with Merge-Master when resolving them.)
  6. git push origin (feature branch)
  7. git checkout (your branch)
  8. Tell the Merge-Master that you've finished the merge.

Merging from a feature branch to the Dev branch

  • Are you the Merge-Master? If not, get explicit permission from the Merge-Master first.

Merging from the Dev branch to Staging branch

  • Talk to the Deploy Team

Merging from the Staging branch to Deploy branch

  • Deploy Team only.