Changes between Version 65 and Version 66 of HowToGit


Ignore:
Timestamp:
07/31/19 16:02:21 (5 years ago)
Author:
hcho
Comment:

git merge should be done into the same local branch; otherwise, getting a lot of conflicts in and contaminating the master branch

Legend:

Unmodified
Added
Removed
Modified
  • HowToGit

    v65 v66  
    5353# merge updates into local master
    5454git merge upstream/master
     55
    5556# at this point we have reached:
    5657# (HEAD -> master, upstream/master)
    5758
    5859### b) updating releasebranch_7_6
    59 # merge updates into local master
     60# switch to branch
     61# only once
     62git checkout -b releasebranch_7_6 origin/releasebranch_7_6
     63# next time, git checkout releasebranch_7_6
     64
     65# merge updates into local branch
    6066git merge upstream/releasebranch_7_6
     67
    6168# at this point we have reached:
    6269# (HEAD -> releasebranch_7_6, upstream/releasebranch_7_6)
     
    146153git push origin
    147154}}}
     155
    148156== Switching between branches ==
    149157
     
    197205git branch -a
    198206}}}
     207
    199208== Backporting to release branches ==
    200209
     
    209218}}}
    210219
    211 
    212220=== Backporting of a single commit ===
    213221
     
    218226# update master to fetch the commit to be backported
    219227git fetch --all --prune
     228
     229# ??? With git log, identify the sha1sum of the commit you want to backport (example: backport into releasebranch_7_6)
     230git log
    220231
    221232# Note: only needed if you have your fork as "origin" (see above)
    222233# update local repo
    223234## NO git pull origin releasebranch_7_6 --rebase
    224 # merge updates into local master
     235
     236# switch to branch
     237git checkout releasebranch_7_6
     238
     239# merge updates into local releasebranch_7_6
    225240git merge upstream/releasebranch_7_6
     241
    226242# at this point we have reached:
    227243# (HEAD -> master, upstream/releasebranch_7_6, releasebranch_7_6)
     
    230246git push origin releasebranch_7_6
    231247
    232 # ??? With git log, identify the sha1sum of the commit you want to backport (example: backport into releasebranch_7_6)
    233 git log
    234 
    235 # switch to branch
    236 git checkout releasebranch_7_6
    237 
    238248# now backport the commit (edit conflicts if needed)
    239249git cherry-pick the_sha1_sum