You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@carbondata.apache.org by Jean-Baptiste Onofré <jb...@nanthrax.net> on 2016/08/05 12:27:08 UTC

[PROPOSAL] How to merge a pull request

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#issuecomment-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/remotes/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�
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: [PROPOSAL] How to merge a pull request

Posted by Jacky Li <ja...@qq.com>.
definitely +1


> 在 2016年8月9日,下午1:33,Jean-Baptiste Onofré <jb...@nanthrax.net> 写道:
> 
> 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é <jb...@nanthrax.net>
>> 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é
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>> 
>> 
> 
> -- 
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com




Re: [PROPOSAL] How to merge a pull request

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
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� <jb...@nanthrax.net>
> 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�
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>

-- 
Jean-Baptiste Onofr�
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: [PROPOSAL] How to merge a pull request

Posted by Henry Saputra <he...@gmail.com>.
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é <jb...@nanthrax.net>
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é
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Re: [PROPOSAL] How to merge a pull request

Posted by chenliang613 <ch...@gmail.com>.
+1



--
View this message in context: http://apache-carbondata-mailing-list-archive.1130556.n5.nabble.com/PROPOSAL-How-to-merge-a-pull-request-tp18p22.html
Sent from the Apache CarbonData Mailing List archive mailing list archive at Nabble.com.