Skip to content

git_workflow

rwrzesien edited this page Dec 19, 2017 · 6 revisions
  1. New issue arise (ie. Pivotal task is created).
  2. Developer creates new branch from latest master branch.
git checkout master
git pull origin master
git checkout -b branch_name
  1. Developer writes the code.
  2. Developer writes tests for the code.
  3. Developer commits the code and pushes to remote branch.
git add -A .
git commit
git push -u origin branch_name
  1. When Developer consider his code ready, he checks that:
    1. His implementation matches issue description, that nothing was skipped. If something in his implementation differs from issue description, he explains those differences shortly in comment (TODO: Comment where ? In pivotal, PR, or commit ?).
    2. He makes sure that he creates his branch is based on master or other branch described in pull request (ie. by looking at git log --graph --decorate).
    3. He makes sure that all tests are passing and there are no linting issues by running ./full-check.sh
    4. In cooperation with Cluster Management Team he makes test deployment to cluster devel.concent.golem.network.
    5. He reviews his own code, commit after commit, and checks if there are no unsquashed commits, no [TMP] commits, TMP marks in code, commits that are not related with current issue he is working on. If there are any of those, he fixes them.
  2. Developer creates pull request in Github, adds link to Pivotal issue in comment if there is any, adds at least one reviewer.
  3. Developer stops working on this branch.
  4. Reviewer looks over the code and add his comments over issues he finds.
  5. Developer:
    1. Fixes each issue in separate commit using --fixup.
    git commit --fixup original_issue_commit_id
    
    1. Put each commit just after the commit that creates the issue, using interactive rebase.
    git rebase master --interactive
    
    The cause of that reviewer will see only this modification in next review. 3. Rebases master to his branch if there are any new commits on master.
  6. Reviewers looks over fixes. Steps 9-11 are repeated until code is free of issues.
  7. One of the reviewers squashes fixing commits, rebases master and merges.
  8. Github pull request is closed,
  9. Developer marks Pivotal task as Finished and adds Github pull request link to Pivotal task in comment.
Clone this wiki locally