Changes between Version 45 and Version 46 of HowToGit


Ignore:
Timestamp:
05/26/19 04:30:18 (6 years ago)
Author:
neteler
Comment:

Draft workflow for backporting

Legend:

Unmodified
Added
Removed
Modified
  • HowToGit

    v45 v46  
    154154== Backporting to release branches ==
    155155
    156 TODO
     156=== Preparation ===
     157
     158If you checked out the release branch into a separate directory, be sure to have "upstream" enabled as a remote:
     159
     160{{{
     161git remote -v
     162# if upstream is missing, execute
     163git remote add upstream git@github.com:OSGeo/grass.git
     164}}}
     165
     166
     167=== Backporting of single commits ===
     168
     169{{{
     170git checkout master
     171# With git log, identify the sha1sum of the commit you want to backport (example: into releasebranch_7_6)
     172
     173# switch to branch
     174git checkout releasebranch_7_6
     175# update
     176git pull origin releasebranch_7_6 --rebase
     177# backport the commit
     178git cherry-pick the_sha1_sum
     179# push to upstream
     180git push upstream releasebranch_7_6
     181}}}
    157182
    158183See also https://github.com/OSGeo/gdal/blob/master/CONTRIBUTING.md#backporting-bugfixes-from-master-to-a-stable-branch
    159184
     185=== Backporting of a merged pull request from master ===
     186
     187Same as "Backporting of single commits" but with multiple `git cherry-pick ...`. Importantly, in the right order.
     188
     189TODO: there must be a better way!!
     190
     191=== Made a mess? Fix it ===
     192
     193Example: mess happened on releasebranch_7_6:
     194
     195{{{
     196git reset --hard upstream/releasebranch_7_6
     197git pull upstream releasebranch_7_6 --rebase
     198
     199# now all should be clean again
     200}}}
    160201== Further reading ==
    161202