Changes between Version 1 and Version 2 of GitTips


Ignore:
Timestamp:
02/23/2010 02:43:56 PM (14 years ago)
Author:
johnnyg
Comment:

multi-commit

Legend:

Unmodified
Added
Removed
Modified
  • GitTips

    v1 v2  
    11= Git Tips = 
    22 
    3 [[PageOutline(2,,inline)]] 
     3[[PageOutline(2,Tips,inline)]] 
    44 
    55This page is a collection of useful git tips. 
     6 
     7== Apply a commit to multiple branches == 
     8 
     9 1. Checkout master branch 
     10{{{ 
     11git checkout master 
     12}}} 
     13 1. Make commit 
     14{{{ 
     15git commit -a -m "Fixed bug" 
     16}}} 
     17 1. Checkout stable branch 
     18{{{ 
     19git checkout stable 
     20}}} 
     21 1. Apply the last commit to master to this branch as well 
     22{{{ 
     23git format-patch -k --stdout -1 master | git am -3 -k 
     24}}} 
     25 1. Repeat steps 3-4 as necessary 
     26 1. PROFIT!