Skip to content

Best Practices

Ken Krugler edited this page Sep 28, 2017 · 4 revisions

This is the page where we list "best practices" used when developing.

Pushing changes that are associated with a filed issue

Create the pull request

  • git checkout master
  • git pull
  • git checkout -b NN_description-of-issue (where NN is the issue number)
  • Make changes to fix issue
  • run tests
  • commit changes to local branch (e.g. with UI app, or git commit -am "blah" from command line)
  • git push origin <branch name>
  • Switch to GitHub, create pull request
  • Assign pull request to yourself
  • Assign reviewer (if significant)

After the reviewer has approved the changes

  • Go to GitHub pull request page in browser.
  • Select "Squash and Merge" option, click the "Squash and Merge" button.
  • Click the "Confirm" button in confirmation message.
  • Click the "Delete Branch" button.
  • Navigate to the corresponding GitHub issue, and close it.
  • git checkout master
  • git pull

If you don't want to keep around the local branch, then run git branch -d <branch>

If you have to update for the pull request

  • Make changes in your local branch
  • Run tests
  • Commit changes to local branch (e.g. with UI app, or git commit -am "blah" from command line)
  • git checkout master
  • git pull
  • git checkout <branch>
  • git merge master
  • Fix any conflicts
  • Run tests
  • git push origin <branch>