Backport sync: merge mess
Markus Neteler <[email protected]>
| Newsgroups | gmane.comp.gis.grass.devel |
|---|---|
| Message-ID | <CALFmHhvEywvFh_TpbCK6Rp9vegxzadpzbWPxbKw+EXeuKZfx2w@mail.gmail.com> |
(cc grass-dev, to avoid that it gets lost) On Tue, Apr 7, 2020 at 3:24 PM Vaclav Petras <[email protected]> wrote: > Fortunately, having *Squash and merge* saves the day here. Couple notes: > > 1. If you end up doing git pull instead of git rebase, you can try > setting git config --global pull.rebase true for git pull to be > automatically turned into git pull --rebase. I don't have experience > with how this plays out with the upstream+fork setup, so you need to test. > However, the point here is that Git won't do merge unless you ask it to do > it, well, git pull is one of the ways you are telling Git to do merge, > although it does not seem that way. I recommend the git man page > generator > <https://git-man-page-generator.lokaltog.net/#aa9b72bf4fa689dc39dc9d297f35142d> > to mediate the pain from this. > 2. *Squash and merge* allows editing the commit message. > 3. Unless you do or already did something to fix it, your > releasebranch_7_8 (i.e., releasebranch_7_8 in the neteler fork) still > contains all this and you need to clean it before you can backport again. > You need to trash (assuming it's trash) what you have in your local > releasebranch_7_8 branch and force it to be whatever the upstream state of > the branch is. The git reset command should do the trick with these > parameters: git reset --hard upstream/releasebranch_7_8 (related SO > answer <https://stackoverflow.com/a/9210705/574907>). You can confirm > by looking at commits on GitHub and locally with git log. > 4. If you are doing a PR to update any branch, you need to do that > from a new dedicated branch in your fork. If you don't do that, your branch > (here: neteler:releasebranch_7_8) will diverge from the upstream one (here: > OSGeo:releasebranch_7_8) and you will end up doing steps in number 3 in > order to stop propagating the unwanted commits. This is due to the > difference between doing push directly to upstream (git push upstream > releasebranch_7_8) which just pushes local commit(s) you have and PR > workflow where a new commit is always created in the upstream and thus you > don't have it locally. > > As I mentioned previously on mailing list, note that the randomly > generated Git man pages <https://git-man-page-generator.lokaltog.net/> > actually need to explicitly say that they are not the real documentation. > > — > Context: view it on GitHub (#484) > <https://github.com/OSGeo/grass/pull/484#issuecomment-610384581> > _______________________________________________ grass-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/grass-dev