Login  Register

Re: [PROPOSAL] How to merge a pull request

Posted by Jacky Li on Aug 09, 2016; 12:55pm
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/PROPOSAL-How-to-merge-a-pull-request-tp18p64.html

definitely +1


> 在 2016年8月9日,下午1:33,Jean-Baptiste Onofré <[hidden email]> 写道:
>
> Yes good idea.
>
> I'm thinking about a github PR template too as we use in Beam.
>
> Regards
> JB
>
> On 08/09/2016 07:31 AM, Henry Saputra wrote:
>> This is great stuff, thanks for taking stab at it, JB.
>>
>> I would reccommend we add tool in the source code to help committers merge
>> PRs.
>>
>> Some projects like Apache Spark [1] and Apache Flink have simple script to
>> help automate the process.
>> We could adopt the script to do similar thing for CarbonData.
>>
>> - Henry
>>
>> [1] https://github.com/apache/spark/blob/master/dev/merge_spark_pr.py
>>
>> On Fri, Aug 5, 2016 at 5:27 AM, Jean-Baptiste Onofré <[hidden email]>
>> wrote:
>>
>>> Hi guys,
>>>
>>> I discussed with Ravi how to cleanly merge a pull request, eventually
>>> applying changes, keeping the original commit author, etc.
>>>
>>> I proposed a procedure:
>>>
>>> https://github.com/apache/incubator-carbondata/pull/63#issue
>>> comment-237817370
>>>
>>> For convenience, let me paste the proposal here:
>>>
>>> Prerequisite
>>>
>>> Assuming, you cloned the Apache git repo:
>>>
>>> git clone https://git-wip-us.apache.org/repos/asf/incubator-carbondata
>>> I advise to rename origin remote as apache:
>>>
>>> git remote rename origin apache
>>> Now, let's add the github remote:
>>>
>>> git remote add github https://github.com/apache/incubator-carbondata
>>> For convenience, we add a new fetch reference for the pull requests:
>>>
>>> git config --local --add remote.github.fetch '+refs/pull/*/head:refs/remote
>>> s/github/pr/*'
>>> Then, we can fetch all, including the pull requests:
>>>
>>> git fetch --all
>>> Pull Request Branch
>>>
>>> Now, we are ready to checkout a pull request in a specific branch:
>>>
>>> git checkout -b pr-63 github/pr/63
>>> You are now on the pull request (#63) branch: you can review and test the
>>> pull request (building with Maven, verify, ...).
>>>
>>> Then, you can amend the commit, squash several commits in one, rebase,
>>> etc. Basically, it's where you are preparing the merge.
>>>
>>> Merging the Pull Request
>>>
>>> Once the pull request branch is ready, you can merge on master:
>>>
>>> git checkout master
>>> git merge --no-ff -m "[CARBONDATA-140] This closes #63" pr-63
>>> git push
>>> Once the merge has been done, you can delete the pull request branch:
>>>
>>> git branch -D pr-63
>>>
>>>
>>> Thoughts ?
>>>
>>> Regards
>>> JB
>>> --
>>> Jean-Baptiste Onofré
>>> [hidden email]
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>
>
> --
> Jean-Baptiste Onofré
> [hidden email]
> http://blog.nanthrax.net
> Talend - http://www.talend.com