Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Pragmatic Git workflow


Published on

How to leverage git branches for clean and readable commit history.

  • Be the first to comment

Pragmatic Git workflow

  1. 1. Pimp my Git Pragmatic Git workflow
  2. 2. Pulling the right way Building a house
  3. 3. Multiple teamsOne team builds the roof Another seeds grass on the yard
  4. 4. Conflictless cooperation Oh, really? git pull
  5. 5. Git problem #721“pull” does merge by default (rebase is an option)
  6. 6. Merging smarter git pull --rebase
  7. 7. Merge
  8. 8. Rebase
  9. 9. After rebase
  10. 10. CommandmentThou shalt pull with --rebase option.
  11. 11. Merging even smarter $ sudo gem install git-up
  12. 12. Building a house
  13. 13. My workflow Create a private branch and do some work.
  14. 14. In the meantimeSomeone else started working on the project
  15. 15. Risk of conflict
  16. 16. Rebase before merge On feature branch, rebase with master branch git rebase master
  17. 17. Resolve conflict Resolve conflict on your local branch git add . git rebase --continue
  18. 18. Merge with squashgit checkout mastergit merge feature --squashgit commit
  19. 19. Why? Clean history Each work item == one commitDo not trash log with checkpoint commits Conflicts resolved early Missing (unnecessary) granularity