Upgrade to Pro — share decks privately, control downloads, hide ads and more …



Oursky Limited

June 23, 2015

More Decks by Oursky Limited

Other Decks in Programming


  1. Create new branch • Creating an environment where you can

    try out new ideas, you're free to experiment and commit changes • Don't affect the master branch • Anything in the master (production) branch is always deployable • Use descriptive branch name, e.g. refactor- authentication, user-content-cache-key
  2. Add commits • Transparent history that others can follow to

    understand what you've done and why • Clear commit message help explaining why a particular change was made • Separate unit of change • Allow roll back changes if a bug is found, or if you decide to head in a different direction
  3. Open a Pull Request • Initiate discussion about your commits

    • You're ready for someone to review your work • Using @mention • Start code review and conversation about proposed changes before they're merged into the master branch
  4. Discuss and review your code • Person or team reviewing

    your changes may have questions or comments • Designed to encourage and capture this type of conversation • Continue to push to your branch in light of discussion and feedback about your commits
  5. Merge and deploy • After review and test, merge branch

    to master for deployment • When pull request is merged, the related issues are also closed
  6. Fork A Repo • Propose changes to someone else's project

    • Use someone else's project as a starting point for your own idea
  7. The Golden Rule of Rebasing • Never use it on

    public branches • Local Cleanup
  8. Force-Pushing • Git will prevent you from doing so because

    it conflicts with the remote master branch • We need force pushing • Be very careful with this command!
  9. Atomic commit • Keep commit small and atomic • Revolves

    around one task or one fix • Code Reviews are Easier • Easier to Roll Back • Commit message, One line description with issue reference < 50 char • More detailed explanatory text, if necessary
  10. refs • Github workflow: https://guides.github.com/introduction/ flow/index.html • Fork a repo:

    https://help.github.com/articles/fork-a-repo/ • Merge vs rebase: https://www.atlassian.com/git/tutorials/ merging-vs-rebasing/workflow-walkthrough • Oursky Dev’s Guide: https://oursky.quip.com/ u1GVA1zDkOnJ • Better commit message: https://robots.thoughtbot.com/5- useful-tips-for-a-better-commit-message