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

Git Workflows: Beware of merge conflicts, they ...

Git Workflows: Beware of merge conflicts, they bite you!

Olawale

July 07, 2023
Tweet

Other Decks in Programming

Transcript

  1. Outline • Why do we need them? • What are

    they? • How do I use them? • Useful git commands
  2. Git Workflow - Types • Git Flow • Github flow

    • Trunk-based flow • Space Git Flow
  3. Git Flow - Supporting Branches main develop feature branches $

    git checkout -b release-1.0 develop release branches release branch for 1.0 release branch 1.1
  4. Useful git commands Git merge vs Git Rebase Both are

    used for incorporating changes from one branch to another!
  5. Git Rebase Result develop git checkout feature git rebase develop

    • No new merge commit • It results in a linear git history
  6. Git Rebase - Interactive mode git checkout feature git rebase

    -i develop pick 33d5b7a Add paypal payment method #1 pick 9480b3d Fix something #2 pick 5c67e61 Add idea payment method #3 develop
  7. Git Rebase - Interactive mode SQUASHING! pick 33d5b7a Add paypal

    payment method #1 fixup 9480b3d Fix something #2 pick 5c67e61 Add idea payment method #3 develop
  8. Git Rebase The golden rule of git rebase is to

    never use it on public branches