Pimp my Git  Pragmatic Git workflow
Pulling the right way       Building a house
Multiple teamsOne team builds the roof   Another seeds grass on the yard
Conflictless cooperation          Oh, really?            git pull
Git problem #721“pull” does merge by default (rebase is an option)
Merging smarter     git pull --rebase
Merge
Rebase
After rebase
CommandmentThou shalt pull with --rebase option.
Merging even smarter    $ sudo gem install git-up
Building a house
My workflow  Create a private branch    and do some work.
In the meantimeSomeone else started working on the project
Risk of conflict
Rebase before merge  On feature branch, rebase with master branch            git rebase master
Resolve conflict Resolve conflict on your local branch        git add .        git rebase --continue
Merge with squashgit checkout mastergit merge feature --squashgit commit
Why?             Clean history    Each work item == one commitDo not trash log with checkpoint commits        Conflicts re...
Upcoming SlideShare
Loading in …5
×

Pragmatic Git workflow

545
-1

Published on

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

0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
545
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
10
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

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
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×