Skip to content

Instantly share code, notes, and snippets.

@ryanflach
Forked from erinnachen/git-workflow.markdown
Last active March 13, 2020 21:28
Show Gist options
  • Save ryanflach/abd8122436221e672fc348e5d682600b to your computer and use it in GitHub Desktop.
Save ryanflach/abd8122436221e672fc348e5d682600b to your computer and use it in GitHub Desktop.
My Git Workflow

Project workflow:

  1. Load/Reload waffle.
  • Get most current list of actions for the project.
  1. Choose a card from the backlog in waffle. If we're working separately, it's best to move that card that you've chosen into ready and perhaps assign it to yourself as well.
  • Make sure multiple team members aren't working on the same issue; ensure everyone knows what each other is working on.
  1. git checkout master
  2. git pull origin master
  • Ensure you're starting on the master branch and have the most recent changes pulled down.
  1. run rspec
  • Make sure there are no outstanding issues with code on master.
  1. Checkout a new branch and tag it with #issue_number
  • Always be on a new branch when working on a feature (version control) - tagging it enables better integration with Waffle.
  1. Write the feature test associated with your waffle card.
  • TDD!
  1. Run rspec, and make sure that there are no errors that blow up the stack (missing ends, forgetting capitalization, etc.)
  • Make sure your tests don't include syntax errors or other issues outside of the feature not yet existing.
  1. commit your feature test
  • Commit each step of the way.
  1. push this up to github, and create a [WIP] pull request.
  • Show that you're making progress but it is a work-in-progress, allow comments and conversation around code.
  1. start implementing the features
  • Get to work.
  1. when you commit, remember to push up to remote, and wait for hound to respond
  • Keep current work available online. Hound is a Ruby style checker (configurable).
  1. If there is an issue, ping other people and make question comments with references on your pull request. Wait for aid. Remember to ping on the slack channel as well.
  • Constant communication with team members.
  1. Correct the hound issues you have, go to step 10.
  • Utilize good workflow.
  1. When your feature test passes, commit and push up to GitHub. Wait for those hound requests to come back in.
  • You've passed the tests you built based on the user stories.
  1. Deal with hound. Push up to Github. Repeat until hound is dealt with.
  • Fix any style issues.
  1. Search the project for binding.pry and save_and_open_pages leftover. Take those remnants out of the code.
  • You're the trashman/woman.
  1. Run rails s and see if everything looks and behaves like you want it to. Fix those and commit. Deal with hound.
  • In Sinatra, run shotgun - visual double-check.
  1. If there are really obvious sad paths for your feature test, you should write that test and return to Step 10.
  • Cover your bases.
  1. Rebase and squash the commits that you do not want record for posterity.
  • Means of cleaning up and consolidating commit history.
  1. Check if your branch comes from the latest master, and if not pull master into your branch.
  • Get most recent code from master into your branch.
  1. Run rspec one more time
  • Ensure no errors.
  1. Remove [WIP] from pull request. If you're not paired, tag others and ping slack for a code review.
  • No longer a work-in-progress. Do code review for a second set of eyes.
  1. After code is merged to master, remember to push to heroku with git push heroku master and heroku run rake db:migrate
  • Push to production.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment