Process - makersquare/clicker GitHub Wiki

Process

Kanban Board

We have a kanban board: https://waffle.io/makersquare/clicker

Feel free to create new cards (also known as new issues). Your new cards will go under the Planning column. Check in with Gilbert to make sure a Planning card is solid enough to move into the Ready column.

  • Planning - These are still being discussed and solidified. You're encouraged to contribute to discussions, but don't start coding on these.
  • Ready - These are ready to pick up and start coding. Before you start, talk with Gilbert about implementation strategy, then assign yourself and move the card to In Progress.
  • In Progress - These issues are currently being worked on.
  • In Review - These are pull requests (though some will be non-coding tasks) ready for review. When you create a PR, you should move it here when it's ready for review. Gilbert will review your code and comment on changes that need to be made. If everything's good, he will give it a thumbs up (in a comment) and merge it in.

Development Tips

When working on your feature branch, rebase with master frequently. You can do this easily by running:

# MAKE SURE YOU ARE ON YOUR FEATURE BRANCH
$ git fetch origin master
$ git rebase origin/master

Notice how you don't have to switch branches! :D

If you want to make this even shorter, run this once:

$ git config alias.mm '!git fetch origin master; git rebase origin/master'

...and then run git mm to rebase your feature branch with master. Cool!

Pull Request Descriptions

Whenever you create a pull request, you should include Closes #8 in the description, where 8 is the number of the issue you're resolving. When that PR gets merged in, it will automatically close that issue. Nice!

Starting a Feature Branch

When you start a new feature, you want to branch off the latest version of master. Your flow will look something like this:

$ git checkout master
$ git pull origin master
$ git checkout -b my-feature

Workflow for Completing a Feature Branch

Your flow will look something like this:

# MAKE SURE YOU ARE ON YOUR FEATURE BRANCH
# 1. First, fetch latest changes from master
$ git fetch origin master
# 2. Next, rebase your feature branch
$ git rebase origin/master
# 3. Resolve any merge conflicts (See "Resolving Merge Conflicts" below)
# 4. Then push your feature branch to GitHub (you might need to force push)
$ git push origin my-feature
# 5. Ping Gilbert to merge it in, then high five a nearby teammate!

Resolving Merge Conflicts

If there are merge conflicts, you need to resolve them with:

$ git mergetool

Your merge tool should open (if not, see the next section). Resolve the conflicts, then save & quit the mergetool. If there are more conflicts, git will immediately prompt you for another round. Otherwise, nothing will happen.

Once you're done merging conflicts, do not commit. Instead, run git rebase --continue

I don't have a mergetool set!

Fix it by using the the Opendiff mergetool. You can ensure this mergetool is selected by typing the following (you only have to do this once):

$ git config --global merge.tool opendiff

Opendiff shows 3 screens: top left refers the Master branch, top right refers to your Feature branch, and the bottom section refers to the final, live version of your merge. From each comparison down the middle, splitting the Master and Feature branch comparisons, select the Action of picking the left, right, right first then left, left first then right, or neither versions. If none of those options make sense, you can edit the final, live version directly (click in the bottom section of the live, merged version). After completing all differences and compares, save and quit to move to the next merge conflict. If there are no merge conflicts, proceed to next step.