Skip to content

Workflow

Philip Kiely edited this page Oct 7, 2019 · 3 revisions

Adopting a few lightweight procedures will help us work effectively.

Tickets

Every ticket starts life in "To Do" if the ticket is for current sprint, else it goes in "Backlog". When you start on the ticket, move it into the "In Progress" column. When it's ready to review, move it to "In Review" and message your reviewer. Once they approve it, move the ticket to "Done" after performing whatever actions are needed to finalize the work (for example, pushing to master).

Git

Most tickets will include development or documentation tasks that will be committed to the code base. In this case, we follow the following protocol to keep the codebase clean.

Git Workflow:

  • Starting a ticket
    • git pull on master to make sure your local master is up-to-date
    • git checkout -b branch-name to make a new branch for the story. The branch should have a meaningful name.
  • Working on a ticket
    • make regular commits and pushes on the branch branch-name
  • Ticket ready for review
    • squash all changes (git rebase -i head~NUM_COMMITS) where NUM_COMMITS is the number of commits you have made on your branch into a single commit with a meaningful commit message
    • git push --force branch-name force push to YOUR BRANCH and NOT MASTER
    • Open a pull request to master
    • While you and your reviewer discuss changes, make and push as many commits as necessary
  • Ticket Done
    • Once your changes are approved, squash all changes and force push to your branch.
    • git checkout master
    • git pull origin master to get any commits that other people have merged in the meantime
    • git checkout your-branch
    • git rebase master which might give merge conflicts. If there are, fix them then run git rebase --continue
    • force push your branch
    • git checkout master
    • git rebase your-branch
    • git push master NOT a force push

Pouya's Comments:

  1. In 'Ticket ready for review', is the NUM_COMMITS a place holder for the number of commits I have made? So, say for example I made 5 commits, would the command be git rebase -i head~5 ? I'm assuming this automatically prompts a commit message.

Answer:

Yes, this is correct. The command will give you an editor allowing you to squash, which will launch another editor that will allow you to edit the commit message.

Clone this wiki locally