Skip to content
Michael Fritz edited this page Jun 22, 2016 · 14 revisions

At Daft Labs we use a Github Workflow for all projects where we administer the project repository. This procedure assumes you have a local running copy of the application, if not the following commands will most likely be enough to get going (do not copy $ ):

  1. $ ``git clone git@github.com:daftlabs/<project_name>.git
  2. $ ``git submodule update --init --recursive
  3. $ ``docker-compose up

*see Docker Setup to get docker setup

  1. Once you are ready to begin development on a story the first step is to grab the reference to the story from Pivotal Tracker. This will be the story ID. If you're using chrome, you can use the extension Easy Copy for Pivotal Tracker . Make sure you are on the master branch of the project and then pull the latest remote changes. Branch off of master using the Pivotal Tracker ID as the branch name. (feel free to add more descriptor to the branch name eg 12351324-descriptive-words )

  2. Do awesome programming things to implement the requirements of the story.

  3. Check your changes, both on files served by the virtual server on your dev machine and it terminal using git diff file_name.

ProTip: Any non trivial change is probably going to require some tests. You did write tests right?

  1. Push your branch to Github. When you are working from a newly created branch, you'll have to:

$ ``git push --set-upstream origin <your_new_branch_name>

ProTip: Make sure your commit messages are useful. Any developer will be able to see what you did by generating a diff, but sometimes it’s hard to tell why your change was necessary, so make sure to address that. There is optional Pivotal Tracker integration support available. If you reference the pivotal tracker id in your commit message, it will automagically show up in the pivotal tracker activity history._ http://pivotallabs.com/level-up-your-development-workflow-with-github-pivotal-tracker/

  1. Open a pull request referencing your branch with the Github user interface. The description of the pull request should include a link to the Pivotal Tracker story.

  2. At least 2 other developers or 1 lead project developer needs to review and sign off on your pull request. They will signify a sign off by commenting with a 🍰 .

  3. Once you have passed code review, you may now merge your branch into master.

Deployment Schedule?

Client dependent, so ask your nearest project manager.

Tips

git branch --merged master | grep -v "\* master" | xargs -n 1 git branch -d

Deletes all branches from Github that have already been merged into master.

Install the daftlabs-dl-profile for helpful aliases.

Clone this wiki locally