[GRASS-dev] git merge mess on master

Vaclav Petras wenzeslaus at gmail.com
Tue May 21 10:12:03 PDT 2019


On Tue, May 21, 2019 at 7:48 AM Markus Neteler <neteler at osgeo.org> wrote:

> On Tue, May 21, 2019 at 11:23 AM Bas Couwenberg <sebastic at xs4all.nl>
> wrote:
> > On 2019-05-21 11:22, Markus Neteler wrote:
> > > How to revert that? Of course someone had to run into this at some
> > > point, so seems I "volunteered" to be the first :((
> >
> > rebase and force push.
>
> Thanks - we investigated further with two local git gurus, it seems
> that nothing happened and things are indeed ok.
>

Well, there is "Merge branch 'master' of github.com:OSGeo/grass" commit
which happens when your local repo was not up to date, you did a commit,
and you did git pull for Git to allow you to do git push.

While commits like "Merge pull request #2 from pmav99/t3844" seems equally
messy, they 1) include only the relevant changes and 2) they tell us when
the changes were merged into master. "Merge branch 'master' of
github.com:OSGeo/grass"
commit contains all sorts of changes and what it tells us is when you
updated your local repository clone which is comparatively less useful
information.

Commits like "Merge branch 'master' of github.com:OSGeo/grass" are
unavoidable with pushing directly to master unless you use rebase when
catching up with upstream changes. Unless you are careful and do rebase
every time (or set your Git to do that), this will happen every time you
are out of sync with upstream changes, so potentially once for every
commit. Thus, we should be using forks and PRs (every time) until we decide
otherwise.

If something happened or not depends on if we want a commit like "Merge
branch 'master' of github.com:OSGeo/grass" in the history. In our lab
repos, we have plenty of these commits because in most cases we don't care
about clean commit history and often only one person works on the repo
content at one time (so no sync is needed). Anyway, this commit does *not*
show in the individual file history or blame on GitHub. I don't know about
git bisect, but since you would operate over whole repository, I assume it
would show up which might be quite confusing if it is indeed the case.

Vaclav

https://github.com/OSGeo/grass/commits/master/README.md
https://github.com/OSGeo/grass/blame/master/README.md
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20190521/29c8924b/attachment-0001.html>


More information about the grass-dev mailing list