[GRASS-dev] git merge mess on master
Vaclav Petras
wenzeslaus at gmail.com
Tue May 21 17:41:08 PDT 2019
The commit "Merge pull request #14 from neteler/master" [1] is from master
branch, not from dedicated branch as specified in HowToGit. I don't know
for sure, but I think will get messy now when you will try to make more
changes.
1) There is probably a smart way to resolve it. Something along the lines
of what Bas suggested to the situation before but you can also backup diffs
for all you changes (if any), delete fork and delete your local clone and
start over.
2) Follow the guidelines (you wrote :-)
3) When in doubt, use the trick of Git rookies: Have your work/repo also in
a separate directory on the side before executing Git commands (no shame in
that).
4) Note that randomly generated Git man pages are so close to real ones
that they actually need to explicitly say that it is not a real
documentation [2].
Vaclav
[1]
https://github.com/OSGeo/grass/commit/2ff8d1e762d646dd8be82b8da483d12c2a772c26
[2] https://git-man-page-generator.lokaltog.net/
On Tue, May 21, 2019 at 1:12 PM Vaclav Petras <wenzeslaus at gmail.com> wrote:
>
>
> 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/38e1abad/attachment.html>
More information about the grass-dev
mailing list