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

Git Workflows: Little Red Riding Hood and the Big Bad Ogre

Git Workflows: Little Red Riding Hood and the Big Bad Ogre

Presented at DevNexus 2015

Travis Douce

March 11, 2015
Tweet

More Decks by Travis Douce

Other Decks in Programming

Transcript

  1. What is Git? Create repo Basic workflow Understanding history Rebase

    (interactive) Branches Merge Remotes Merge vs Rebase
  2. What is Git? Create repo Basic workflow Understanding history Rebase

    (interactive) Branches Merge Remotes Merge vs Rebase
  3. What is Git? Create repo Basic workflow Understanding history Rebase

    (interactive) Branches Merge Remotes Merge vs Rebase
  4. What is Git? Create repo Basic workflow Understanding history Rebase

    (interactive) Branches Merge Remotes Merge vs Rebase
  5. What is Git? Create repo Basic workflow Understanding history Rebase

    (interactive) Branches Merge Remotes Merge vs Rebase
  6. What is Git? Create repo Basic workflow Understanding history Rebase

    (interactive) Branches Merge Remotes Merge vs Rebase
  7. What is Git? Create repo Basic workflow Understanding history Rebase

    (interactive) Branches Merge Remotes Merge vs Rebase
  8. What is Git? Create repo Basic workflow Understanding history Rebase

    (interactive) Branches Merge Remotes Merge vs Rebase
  9. Log

  10. Log

  11. Log as graph *lg alias at end of slides Jacob

    configured a git alias, lg. When entered, history is displayed a graph
  12. 1 2 HEAD, master 3 Next commit is on top

    of HEAD What is HEAD? Newest Oldest
  13. 1 2 HEAD, master 3 4 Next commit is on

    top of HEAD What is HEAD? Newest Oldest
  14. f f

  15. Work Flow # 3 (Not so much how you got

    there, but sometimes I do) I want to know what you did Keep a clean history
  16. Work Flow # 3 (Not so much how you got

    there, but sometimes I do) Helps with code reviews by revealing intent I want to know what you did Keep a clean history
  17. Work Flow # 3 (Not so much how you got

    there, but sometimes I do) Helps with code reviews by revealing intent Can rebase to organize history I want to know what you did Keep a clean history
  18. with merge bubbles Make it easy to determine the commits

    that originated in jacob_grimm/body
  19. 1 2 3 4 5 6 HEAD, master jacob_grimm/body 7

    Originated from jacob_grimm/body
  20. Work Flow # 6 Use when merging feature branches Easily

    determine from which feature branch a commit originated No Fast Forward merge strategy
  21. Jacob finished ! and hates it. It’s never merged with

    master. jacob_grimm/The BIg_Bad_Ogre
  22. Jacob finished ! and hates it. It’s never merged with

    master. jacob_grimm/The BIg_Bad_Ogre
  23. Jacob finished ! and hates it. He never merged into

    master. jacob_grimm/The BIg_Bad_Ogre
  24. What is Git? Create repo Basic workflow Understanding history Rebase

    (interactive) Branches Merge Remotes Merge vs Rebase
  25. What is Git? Create repo Basic workflow Understanding history Rebase

    (interactive) Branches Merge Remotes Merge vs Rebase
  26. What is Git? Create repo Basic workflow Understanding history Rebase

    (interactive) Branches Merge Remotes Merge vs Rebase
  27. What is Git? Create repo Basic workflow Understanding history Rebase

    (interactive) Branches Merge Remotes Merge vs Rebase
  28. What is Git? Create repo Basic workflow Understanding history Rebase

    (interactive) Branches Merge Remotes Merge vs Rebase
  29. What is Git? Create repo Basic workflow Understanding history Rebase

    (interactive) Branches Merge Remotes Merge vs Rebase
  30. What is Git? Create repo Basic workflow Understanding history Rebase

    (interactive) Branches Merge Remotes Merge vs Rebase
  31. What is Git? Create repo Basic workflow Understanding history Rebase

    (interactive) Branches Merge Remotes Merge vs Rebase
  32. Install Git! http://git-scm.com/book/en/v2/Getting-Started-Installing-Git http://kj-prince.com/code/install-git-mac-osx-homebrew/ Git Pro! http://git-scm.com/book/en/v2 Bash Completion! https://github.com/bobthecow/git-flow-completion/wiki/Install-Bash-git-completion

    https://conra.dk/2013/01/18/git-on-osx.html Display git branch name in prompt! http://stackoverflow.com/questions/17333531/how-can-i-display-the-current- branch-and-folder-path-in-terminal Git Workflow Videos with Andy Lindeman! http://vimeo.com/33166064 http://vimeo.com/33165748 Well formed commit messages! http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html http://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message Resources