You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Prashanth Venkatesan <pr...@gmail.com> on 2018/06/28 18:13:12 UTC
RE: JIRA #NIFI-5327 #PR 2820
Team,
I committed code and created PR yesterday
https://github.com/apache/nifi/pull/2820 . I missed to do checkstyle
validation. Now i edited those changes and merge my changes in separate
commit. Now it is showing *6 commits*[
https://github.com/apache/nifi/pull/2820/commits] in PR dashboard in github.
I followed all the steps provided from* "Commit your changes"* section
till *"git
push"* section in this link [
https://cwiki.apache.org/confluence/display/NIFI/Contributor+Guide#ContributorGuide-HowtocontributetoApacheNiFi
]
Can anyone please tell me , did i make any mistake? If so, how to rectify
it?
--
*With regards,*
Prashanth V
Re: JIRA #NIFI-5327 #PR 2820
Posted by Andy LoPresto <al...@apache.org>.
I’m not sure of the exact sequence of events that led to your situation, but in general, you want to do the following:
# One time
git clone git@github.com:<your_github_name>/nifi # Clones your fork of the NiFi repository
git remote add upstream git@github.com:apache/nifi # Makes sure that your repo has the upstream repo added
git remote -v # Lists the repositories; this should at least have yours as “origin” and apache/nifi as “upstream”
# Continuously
git fetch --all # Ensures remote branches are fetched
git checkout master # Gets you to the current master
git pull upstream master # Pulls the changes that have been committed to apache/nifi that may not be in your fork into your local working copy
git push origin master # Syncs your fork with the central repository changes you just pulled
# To make a branch (from an up-to-date master)
git checkout -b NIFI-1234 upstream/master # Checks out master as a new branch named NIFI-1234
# In that branch you make changes, commit, etc.
echo “This is a new code file” > File.java
git add File.java
git commit -m “NIFI-1234 Added File.java”
git log # Will show the log of activity, including your changes and the branch pointers (upstream/master, NIFI-1234, HEAD, etc.)
# To rebase your changes on master (avoid the “merge branch commits”)
git checkout master # Make sure you don’t have any unstaged/uncommitted changes before doing this
git pull upstream master # Pulls remote changes
git checkout NIFI-1234 # Switches back to your feature branch
git rebase master # Basically takes all the commits you made on this branch and replays them after jumping to the most recent remote change
# To open the PR
git push --set-upstream origin NIFI-1234 # Creates a tracked branch named NIFI-1234 on your GitHub repository with the commits you made on this branch
# Go to https://github.com/apache/nifi and you should see a yellow bar across the top prompting you to open a PR from this branch
This is the most prescriptive way; some of these steps can be combined or replaced by other git commands [1] but they are more complicated or obscure what’s actually happening. As you become more comfortable with git, you can implement your own workflow. Hope this helps.
[1] https://git-scm.com/docs/git-pull <https://git-scm.com/docs/git-pull>
Andy LoPresto
alopresto@apache.org
alopresto.apache@gmail.com
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4 BACE 3C6E F65B 2F7D EF69
> On Jun 28, 2018, at 11:35 AM, Prashanth Venkatesan <pr...@gmail.com> wrote:
>
> Thanks Andy. Can you tell me the cause for this? Just to not repeat same
> in future. Shouldn't i *update the local copy of master* [Ref:
> https://cwiki.apache.org/confluence/display/NIFI/Contributor+Guide# <https://cwiki.apache.org/confluence/display/NIFI/Contributor+Guide#>
> ContributorGuide-HowtocontributetoApacheNiFi ]
>
> With Regards,
> Prashanth
>
> On Thu, Jun 28, 2018 at 11:46 PM, Andy LoPresto <alopresto@apache.org <ma...@apache.org>>
> wrote:
>
>> Hi Prashanth,
>>
>> You can cherry-pick the individual commits you want to include onto a new
>> branch and push that up and open a new PR. Just comment on the existing one
>> explaining why and close it.
>>
>> [1] https://git-scm.com/docs/git-cherry-pick <https://git-scm.com/docs/git-cherry-pick>
>> [2] https://stackoverflow.com/a/9339460/70465 <https://stackoverflow.com/a/9339460/70465>
>>
>>
>> Andy LoPresto
>> alopresto@apache.org <ma...@apache.org>
>> *alopresto.apache@gmail.com <ma...@gmail.com> <alopresto.apache@gmail.com <ma...@gmail.com>>*
>> PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4 BACE 3C6E F65B 2F7D EF69
>>
>> On Jun 28, 2018, at 11:13 AM, Prashanth Venkatesan <
>> prashanth.181292@gmail.com> wrote:
>>
>> Team,
>> I committed code and created PR yesterday
>> https://github.com/apache/nifi/pull/2820 . I missed to do checkstyle
>> validation. Now i edited those changes and merge my changes in separate
>> commit. Now it is showing *6 commits*[
>> https://github.com/apache/nifi/pull/2820/commits] in PR dashboard in
>> github.
>>
>> I followed all the steps provided from* "Commit your changes"* section
>> till *"git
>> push"* section in this link [
>> https://cwiki.apache.org/confluence/display/NIFI/Contributor+Guide#
>> ContributorGuide-HowtocontributetoApacheNiFi
>> ]
>>
>> Can anyone please tell me , did i make any mistake? If so, how to rectify
>> it?
>>
>> --
>> *With regards,*
>> Prashanth V
>>
>>
>>
>
>
> --
> *With regards,*
> Prashanth V
Re: JIRA #NIFI-5327 #PR 2820
Posted by Prashanth Venkatesan <pr...@gmail.com>.
Thanks Andy. Can you tell me the cause for this? Just to not repeat same
in future. Shouldn't i *update the local copy of master* [Ref:
https://cwiki.apache.org/confluence/display/NIFI/Contributor+Guide#
ContributorGuide-HowtocontributetoApacheNiFi ]
With Regards,
Prashanth
On Thu, Jun 28, 2018 at 11:46 PM, Andy LoPresto <al...@apache.org>
wrote:
> Hi Prashanth,
>
> You can cherry-pick the individual commits you want to include onto a new
> branch and push that up and open a new PR. Just comment on the existing one
> explaining why and close it.
>
> [1] https://git-scm.com/docs/git-cherry-pick
> [2] https://stackoverflow.com/a/9339460/70465
>
>
> Andy LoPresto
> alopresto@apache.org
> *alopresto.apache@gmail.com <al...@gmail.com>*
> PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4 BACE 3C6E F65B 2F7D EF69
>
> On Jun 28, 2018, at 11:13 AM, Prashanth Venkatesan <
> prashanth.181292@gmail.com> wrote:
>
> Team,
> I committed code and created PR yesterday
> https://github.com/apache/nifi/pull/2820 . I missed to do checkstyle
> validation. Now i edited those changes and merge my changes in separate
> commit. Now it is showing *6 commits*[
> https://github.com/apache/nifi/pull/2820/commits] in PR dashboard in
> github.
>
> I followed all the steps provided from* "Commit your changes"* section
> till *"git
> push"* section in this link [
> https://cwiki.apache.org/confluence/display/NIFI/Contributor+Guide#
> ContributorGuide-HowtocontributetoApacheNiFi
> ]
>
> Can anyone please tell me , did i make any mistake? If so, how to rectify
> it?
>
> --
> *With regards,*
> Prashanth V
>
>
>
--
*With regards,*
Prashanth V
Re: JIRA #NIFI-5327 #PR 2820
Posted by Andy LoPresto <al...@apache.org>.
Hi Prashanth,
You can cherry-pick the individual commits you want to include onto a new branch and push that up and open a new PR. Just comment on the existing one explaining why and close it.
[1] https://git-scm.com/docs/git-cherry-pick <https://git-scm.com/docs/git-cherry-pick>
[2] https://stackoverflow.com/a/9339460/70465
Andy LoPresto
alopresto@apache.org
alopresto.apache@gmail.com
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4 BACE 3C6E F65B 2F7D EF69
> On Jun 28, 2018, at 11:13 AM, Prashanth Venkatesan <pr...@gmail.com> wrote:
>
> Team,
> I committed code and created PR yesterday
> https://github.com/apache/nifi/pull/2820 . I missed to do checkstyle
> validation. Now i edited those changes and merge my changes in separate
> commit. Now it is showing *6 commits*[
> https://github.com/apache/nifi/pull/2820/commits] in PR dashboard in github.
>
> I followed all the steps provided from* "Commit your changes"* section
> till *"git
> push"* section in this link [
> https://cwiki.apache.org/confluence/display/NIFI/Contributor+Guide#ContributorGuide-HowtocontributetoApacheNiFi
> ]
>
> Can anyone please tell me , did i make any mistake? If so, how to rectify
> it?
>
> --
> *With regards,*
> Prashanth V