RE: JIRA #NIFI-5327 #PR 2820

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

RE: JIRA #NIFI-5327 #PR 2820

prashanv
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
Reply | Threaded
Open this post in threaded view
|

Re: JIRA #NIFI-5327 #PR 2820

Andy LoPresto-2
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. 



Andy LoPresto
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

On Jun 28, 2018, at 11:13 AM, Prashanth Venkatesan <[hidden email]> 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*[
<a href="https://github.com/apache/nifi/pull/2820/commits]" class="">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


signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: JIRA #NIFI-5327 #PR 2820

prashanv
 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 <[hidden email]>
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
> [hidden email]
> *[hidden email] <[hidden email]>*
> PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69
>
> On Jun 28, 2018, at 11:13 AM, Prashanth Venkatesan <
> [hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: JIRA #NIFI-5327 #PR 2820

Andy LoPresto-2
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 [hidden email]:<your_github_name>/nifi # Clones your fork of the NiFi repository
git remote add upstream [hidden email]: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. 


Andy LoPresto
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

On Jun 28, 2018, at 11:35 AM, Prashanth Venkatesan <[hidden email]> 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#
ContributorGuide-HowtocontributetoApacheNiFi ]

With Regards,
Prashanth

On Thu, Jun 28, 2018 at 11:46 PM, Andy LoPresto <[hidden email]>
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
[hidden email]
*[hidden email] <[hidden email]>*
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

On Jun 28, 2018, at 11:13 AM, Prashanth Venkatesan <
[hidden email]> 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*[
<a href="https://github.com/apache/nifi/pull/2820/commits]" class="">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


signature.asc (849 bytes) Download Attachment