Strange behavior of GitHub

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Strange behavior of GitHub

Frank H. Ellenberger-3
Hi all,

Dmitry watched, that his PRs disappeared from Maint after I merged them
in Master.

So, what happened?
He sent PR 100-104 to github
I pulled them via https://github.com/Gnucash/gnucash-docs/pull/...
sequently into maint, after each calling locally:
(with git checkout maint)
 git pull
 make
 make check

He watched, they did not appear in code.gnucash.org/docs.

I run yesterday locally
 git checkout master
 git merge maint
 make
 make check
 git push

The guides in https://wiki.gnucash.org/docs/{de|ru}/ were regenerated
last night, while *.{epub|mobi|pdf} are still from 2017-07-01. But that
is a separate issue.

Today Dmitry informs me, his commits disappeared from maint on github.
On my machine I have now 21 unpushed commits in maint.

I am clueless, but remember before the last release also one commit
disappeared.

Does anybody whant to investigate in the current state or can I push
them now again?

Regards
Frank



_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Strange behavior of GitHub

Frank H. Ellenberger-3
A quick look at
https://lists.gnucash.org/pipermail/gnucash-patches/2017-July/date.html#start
shows only
gnucash-docs master: Multiple changes pushed   Frank H.Ellenberger

There seems to be no hook, which pulls changes on github to code.
Together with my git remote configuration:
origin  https://github.com/Gnucash/gnucash-docs (fetch)
origin  [hidden email]:gnucash-docs (push)
:
somehow the changes get lost.

After my pull, my local repo "thinks" code is already up to date and
does not push them there.

And code then seems then to reset github silently.

So I will split my remote origin.

Frank

Am 26.07.2017 um 23:28 schrieb Frank H. Ellenberger:

> Hi all,
>
> Dmitry watched, that his PRs disappeared from Maint after I merged them
> in Master.
>
> So, what happened?
> He sent PR 100-104 to github
> I pulled them via https://github.com/Gnucash/gnucash-docs/pull/...
> sequently into maint, after each calling locally:
> (with git checkout maint)
>  git pull
>  make
>  make check
>
> He watched, they did not appear in code.gnucash.org/docs.
>
> I run yesterday locally
>  git checkout master
>  git merge maint
>  make
>  make check
>  git push
>
> The guides in https://wiki.gnucash.org/docs/{de|ru}/ were regenerated
> last night, while *.{epub|mobi|pdf} are still from 2017-07-01. But that
> is a separate issue.
>
> Today Dmitry informs me, his commits disappeared from maint on github.
> On my machine I have now 21 unpushed commits in maint.
>
> I am clueless, but remember before the last release also one commit
> disappeared.
>
> Does anybody whant to investigate in the current state or can I push
> them now again?
>
> Regards
> Frank
>
>
>

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Strange behavior of GitHub

John Ralls-2
Frank,

That’s correct. You must *never* push directly to the mirror repositories on Github, nor may you use any of the Github merge or edit tools. Push only to code and it will automatically update Github.

I think we can set up the GnuCash Github repositories so that only the special user associated with code can push. I’ll work on that as a preventive measure.

Regards,
John Ralls


> On Jul 26, 2017, at 4:17 PM, Frank H. Ellenberger <[hidden email]> wrote:
>
> A quick look at
> https://lists.gnucash.org/pipermail/gnucash-patches/2017-July/date.html#start
> shows only
> gnucash-docs master: Multiple changes pushed   Frank H.Ellenberger
>
> There seems to be no hook, which pulls changes on github to code.
> Together with my git remote configuration:
> origin  https://github.com/Gnucash/gnucash-docs (fetch)
> origin  [hidden email]:gnucash-docs (push)
> :
> somehow the changes get lost.
>
> After my pull, my local repo "thinks" code is already up to date and
> does not push them there.
>
> And code then seems then to reset github silently.
>
> So I will split my remote origin.
>
> Frank
>
> Am 26.07.2017 um 23:28 schrieb Frank H. Ellenberger:
>> Hi all,
>>
>> Dmitry watched, that his PRs disappeared from Maint after I merged them
>> in Master.
>>
>> So, what happened?
>> He sent PR 100-104 to github
>> I pulled them via https://github.com/Gnucash/gnucash-docs/pull/...
>> sequently into maint, after each calling locally:
>> (with git checkout maint)
>> git pull
>> make
>> make check
>>
>> He watched, they did not appear in code.gnucash.org/docs.
>>
>> I run yesterday locally
>> git checkout master
>> git merge maint
>> make
>> make check
>> git push
>>
>> The guides in https://wiki.gnucash.org/docs/{de|ru}/ were regenerated
>> last night, while *.{epub|mobi|pdf} are still from 2017-07-01. But that
>> is a separate issue.
>>
>> Today Dmitry informs me, his commits disappeared from maint on github.
>> On my machine I have now 21 unpushed commits in maint.
>>
>> I am clueless, but remember before the last release also one commit
>> disappeared.
>>
>> Does anybody whant to investigate in the current state or can I push
>> them now again?
>>
>> Regards
>> Frank
>>
>>
>>
>
> _______________________________________________
> gnucash-devel mailing list
> [hidden email]
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Strange behavior of GitHub

Geert Janssens-4
In reply to this post by Frank H. Ellenberger-3
Frank,

I read the related conversation on IRC today and you raised the concern of creating too many
remotes in your local repository when applying pull requests from there.

Adding a remote only to apply a pull request is not really necessary and I never do it. Instead I
pull the branch from the PR directly into my local repo using "git pull". It takes some shuffling of
the information provided by the PR.

For example, if you get a PR against the gnucash repo with the following message (taken from
the real PR#163):
0-wiz-0 [1]wants to merge 2 commits into Gnucash:master from 0-wiz-0:master
I would locally run this command (with master being checked out and fully up to date with
master on code.gnucash.org):
git pull https://github.com/0-wiz-0/gnucash master

If master on code.gnucash.org has diverged from 0-wiz-0's master branch, this will trigger a
merge action, otherwise it would be a fast-forward.

Sidenote: I used to rebase non-fast-forward PR's to avoid the merge but have stopped doing so
for all but the most trivial PRs. By not rebasing github will properly detect the PR to be merged
after a rebase, one needs to manually close the PR on github. Also a rebase makes it harder for
the author of the PR to sync his local repo with our primary one after the PR is pulled.


Here is a breakdown of the relevant info in the PR message compared to the git pull command:

[github-user] wants to merge x commits into Gnucash:[target-branch] from [github-user]:
[source-branch]
There's an implicit bit of information as well, namely which [repo] the PR is targetting. Obviously
you should work in a local repo for the same source base as in github. So if the PR is against
gnucash-docs, you need to do the git-pull in your local gnucash-docs repo. I mention this,
because you need this bit of information in your git-pull command as well.

So the above translates into
* go to the proper local repo
* check out [target-branch] (master in the example, but can be maint as well for other PR's)
* make sure this branch is up to date with code.gnucash.org (using 'git pull' without any
arguments, assuming you don't have local, non-pushed work on your primary branches. You
don't, right?)
* then formulate the pull from another remote (from the [github-user]'s repo):

git pull https://github.com/[github-user]/[repo] [source-branch]

It's slightly more typing than clicking the fancy button on github, but avoids the need to make
each new repo in a PR a remote.

Regards,

Geert

PS: final note - this technique can be used to pull from any other repository (online or not) as
long as the git command can reach the other repository. So the repository URL can be a github
url (https://github.com/...), but equally a url to another online site that hosts repositories, or
even a file path to another repo on your own PC. For more info search the git help information
on repo urls.


On woensdag 26 juli 2017 23:28:01 CEST Frank H. Ellenberger wrote:

> Hi all,
>
> Dmitry watched, that his PRs disappeared from Maint after I merged them
> in Master.
>
> So, what happened?
> He sent PR 100-104 to github
> I pulled them via https://github.com/Gnucash/gnucash-docs/pull/...
> sequently into maint, after each calling locally:
> (with git checkout maint)
>  git pull
>  make
>  make check
>
> He watched, they did not appear in code.gnucash.org/docs.
>
> I run yesterday locally
>  git checkout master
>  git merge maint
>  make
>  make check
>  git push
>
> The guides in https://wiki.gnucash.org/docs/{de|ru}/ were regenerated
> last night, while *.{epub|mobi|pdf} are still from 2017-07-01. But that
> is a separate issue.
>
> Today Dmitry informs me, his commits disappeared from maint on github.
> On my machine I have now 21 unpushed commits in maint.
>
> I am clueless, but remember before the last release also one commit
> disappeared.
>
> Does anybody whant to investigate in the current state or can I push
> them now again?
>
> Regards
> Frank
>
>
>
> _______________________________________________
> gnucash-devel mailing list
> [hidden email]
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel



--------
[1] https://github.com/0-wiz-0
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Loading...