Changes between Version 99 and Version 100 of HowToGit


Ignore:
Timestamp:
Feb 6, 2022, 9:48:54 AM (10 months ago)
Author:
neteler
Comment:

Updated G78 to G80

Legend:

Unmodified
Added
Removed
Modified
  • HowToGit

    v99 v100  
    5757git remote add upstream git@github.com:OSGeo/grass-addons.git
    5858}}}
     59
    5960=== Working with Git ===
    6061
     
    7273# (HEAD -> main, upstream/main)
    7374
    74 ### b) updating releasebranch_7_8
     75### b) updating releasebranch_8_0
    7576# switch to branch
    7677# only once
    77 git checkout -b releasebranch_7_8 origin/releasebranch_7_8
    78 # next time, git checkout releasebranch_7_8
     78git checkout -b releasebranch_8_0 origin/releasebranch_8_0
     79# next time, git checkout releasebranch_8_0
    7980
    8081# merge updates into local branch
    81 git merge upstream/releasebranch_7_8
     82git merge upstream/releasebranch_8_0
    8283
    8384# at this point we have reached:
    84 # (HEAD -> releasebranch_7_8, upstream/releasebranch_7_8)
     85# (HEAD -> releasebranch_8_0, upstream/releasebranch_8_0)
    8586
    8687# update own remote
     
    175176
    176177If you have access to one of the OSGeo repositories (namely OSGeo/grass in this case), before force pushing, you need be sure that origin points to your fork and not the OSGeo repo. You can check that using `git remote -v`.
     178
    177179== Switching between branches ==
    178180
     
    260262* pr/832
    261263  pr/837
    262   releasebranch_7_6
    263264  releasebranch_7_8
     265  releasebranch_8_0
    264266
    265267# Delete all PRs:
     
    273275To directly fix bugs (ideally via feature branch), do
    274276
    275 (example: https://github.com/OSGeo/grass/tree/releasebranch_7_8)
     277(example: https://github.com/OSGeo/grass/tree/releasebranch_8_0)
    276278
    277279{{{
    278280# push to release_branch, we assume it to be checked out
    279281
    280 cd releasebranch_78/
     282cd releasebranch_80/
    281283# be sure to locally have all updates from server
    282284git fetch --all
     
    284286
    285287# create feature branch
    286 git checkout -b r78_fix_xxx
     288git checkout -b r80_fix_xxx
    287289
    288290# ... do changes...
     
    293295
    294296# push to feature branch
    295 git push upstream r78_fix_xxx
     297git push upstream r80_fix_xxx
    296298}}}
    297299
     
    305307{{{
    306308# switch to release branch
    307 git checkout releasebranch_7_8
     309git checkout releasebranch_8_0
    308310
    309311# be sure to locally have all updates
     
    312314
    313315# delete local feature branch as no longer needed
    314 git branch -D r78_fix_xxx
     316git branch -D r80_fix_xxx
    315317git fetch --all --prune
    316318git branch -a
     
    334336* Your own fork is defined as "origin".
    335337* The OSGeo repo is defined as "upstream".
    336 * Using releasebranch_7_8 branch in the examples as the branch to backport to.
     338* Using releasebranch_8_0 branch in the examples as the branch to backport to.
    337339
    338340First, before you do the //git cherry-pick//, update the local repo and fork to state of upstream with the following four steps.
     
    347349
    348350{{{
    349 git checkout releasebranch_7_8
     351git checkout releasebranch_8_0
    350352}}}
    351353
     
    353355
    354356{{{
    355 git rebase upstream/releasebranch_7_8
     357git rebase upstream/releasebranch_8_0
    356358}}}
    357359
     
    359361
    360362{{{
    361 git push origin releasebranch_7_8
     363git push origin releasebranch_8_0
    362364}}}
    363365
     
    380382
    381383{{{
    382 git push upstream releasebranch_7_8
     384git push upstream releasebranch_8_0
    383385}}}
    384386
    385387This last steps will fail if somebody else did backport after you did the rebase step above. If that's the case, just update your local branch again with the same //git fetch// and //git rebase// commands as before.
     388
    386389=== Made a mess? ===
    387390
     
    398401}}}
    399402
    400 Make sure you are on the right branch (here using releasebranch_7_8):
    401 
    402 {{{
    403 git checkout releasebranch_7_8
     403Make sure you are on the right branch (here using releasebranch_8_0):
     404
     405{{{
     406git checkout releasebranch_8_0
    404407}}}
    405408
     
    407410
    408411{{{
    409 git reset --hard upstream/releasebranch_7_8
     412git reset --hard upstream/releasebranch_8_0
    410413}}}
    411414
     
    414417{{{
    415418git fetch --all --prune
    416 git rebase upstream/releasebranch_7_8
     419git rebase upstream/releasebranch_8_0
    417420}}}
    418421
     
    420423
    421424{{{
    422 git push --force origin releasebranch_7_8
     425git push --force origin releasebranch_8_0
    423426}}}
    424427