Version 4 (modified by johnnyg, 14 years ago) (diff)

added highlighting (somewhat)

Git Tips

Tips

  1. Apply a commit to multiple branches

This page is a collection of useful git tips.

Apply a commit to multiple branches

  1. Checkout master branch
    git checkout master
    
  2. Make commit
    git commit -m "Fixed bug"
    
  3. Checkout stable branch
    git checkout stable
    
  4. Apply the last commit to master to this branch as well
    git format-patch -k --stdout -1 master | git am -3 -k
    
  5. Repeat steps 3-4 as necessary
  6. PROFIT!