The nice thing about git is that every git repo is capable of being a master / 
slave. (The ASF git repo is special only in that it gathers audit logs when 
people push to it, e.g. the IP address where the push came from. Those logs 
will be useful if the provenance of our IP is ever challenged.)

So, the merging doesn’t happen on the GitHub repo. It happens in the repo on 
your laptop. Before merging, you pull the latest from the apache master branch 
(it doesn’t matter whether this comes from the GitHub mirror or the ASF repo - 
it is bitwise identical, as the commit SHAs will attest), and you pull from a 
GitHub repo the commit(s) referenced in the  GitHub PR. You append these 
commits to the commit chain, test, then push to the ASF master branch.

If you add ‘Close #NN’ to the commit comments (and you generally will), an ASF 
commit hook will close PR #NN at the time that the commit arrives in ASF git.


> On Feb 14, 2018, at 6:59 AM, Jonas Pfefferle <> wrote:
> I think you are missing a 3rd option:
> Basically option 1) but we merge the pull request on github and push the 
> changes to the apache git. So no need to delete the PRs. However we have to 
> be careful to only commit changes to github to not get the histories out of 
> sync.
> Jonas
> On Wed, 14 Feb 2018 13:58:58 +0100
> Patrick Stuedi <> wrote:
>> Hi all,
>> If the github repo is synced with git repo only in one direction, then
>> what is the recommended way to handle new code contributions
>> (including code reviews)? We see two options here:
>> 1) Code contributions are issued as PRs on the Crail Apache github
>> (and reviewed there), then merged outside in a private repo and
>> committed back to the Apache git repo (the PR may need to be deleted
>> once the commit has happened), from where the Apache Crail github repo
>> will again pick it up (sync).
>> 2) We don't use the git repo at all, only the github repo. PRs are
>> reviewed and merged directly at the github level.
>> Option (1) looks complicated, option (2) might not be according to the
>> Apache policies (?). What is the recommended way?
>> -Patrick
>> On Mon, Feb 12, 2018 at 5:25 PM, Julian Hyde <> wrote:
>>> No.
>>> Julian
>>>> On Feb 12, 2018, at 08:03, Jonas Pfefferle <> wrote:
>>>> Hi @all,
>>>> Is the Apache Crail github repository synced both ways with the Apache 
>>>> Crail git? I.e. can we merge pull request in github?
>>>> Regards,
>>>> Jonas

Reply via email to