You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by amit mehta <gm...@gmail.com> on 2017/07/01 21:57:09 UTC

[Off-topic] Way of working for PR rework

I have a question regarding "rework on pull request".

For the pull request, I followed the procedure mentioned here [1]
After receiving the comment on the pull request, I did some rework.
Note that the rework was also done in my local branch (mybranch,
This is the same branch which I used for the initial pull request i.e.
$ git push fork mybranch)

so, currently I'm in mybranch ($ git branch) and when I try to do
push (based on the this we search on this topic), I get the
following error message:

---------------------------------------------------------------------------------------
[amit@discworld apache-mynewt-core]$ git remote -v
fork https://github.com/bartledan/incubator-mynewt-core (fetch)
fork https://github.com/bartledan/incubator-mynewt-core (push)
origin https://github.com/apache/incubator-mynewt-core.git (fetch)
origin https://github.com/apache/incubator-mynewt-core.git (push)

[amit@discworld apache-mynewt-core]$ git branch
  master
* mybranch

[amit@discworld apache-mynewt-core]$ git pull --rebase origin master
From https://github.com/apache/incubator-mynewt-core
 * branch            master     -> FETCH_HEAD
Current branch mybranch is up to date.

[amit@discworld apache-mynewt-core]$ git push

fatal: The current branch mybranch has no upstream branch.
To push the current branch and set the remote as upstream, use

   git push --set-upstream origin mybranch
---------------------------------------------------------------------------------------

Which i obviously cannot do (upstream mybranch), as I do not
have commit rights to remote repo, i.e.
'https://github.com/apache/incubator-mynewt-core.git/)

So, what is the way of working for "rework on pull request"

[1] https://cwiki.apache.org/confluence/display/MYNEWT/Submitting+Pull+Requests
[2] https://stackoverflow.com/a/7947337

Thank you for your help.

-Amit

P.S.
I did ask this same question on mynewt slack, but didn't get any
response; weekend effect I guess :)
-- 
Sent from Bahamas, while drinking chi-chi and piña colada.

Re: [Off-topic] Way of working for PR rework

Posted by Pierre Kircher <pk...@me.com>.
try git push -u fork mybranch

> On 1 Jul 2017, at 22:57, amit mehta <gm...@gmail.com> wrote:
> 
> I have a question regarding "rework on pull request".
> 
> For the pull request, I followed the procedure mentioned here [1]
> After receiving the comment on the pull request, I did some rework.
> Note that the rework was also done in my local branch (mybranch,
> This is the same branch which I used for the initial pull request i.e.
> $ git push fork mybranch)
> 
> so, currently I'm in mybranch ($ git branch) and when I try to do
> push (based on the this we search on this topic), I get the
> following error message:
> 
> ---------------------------------------------------------------------------------------
> [amit@discworld apache-mynewt-core]$ git remote -v
> fork https://github.com/bartledan/incubator-mynewt-core (fetch)
> fork https://github.com/bartledan/incubator-mynewt-core (push)
> origin https://github.com/apache/incubator-mynewt-core.git (fetch)
> origin https://github.com/apache/incubator-mynewt-core.git (push)
> 
> [amit@discworld apache-mynewt-core]$ git branch
>  master
> * mybranch
> 
> [amit@discworld apache-mynewt-core]$ git pull --rebase origin master
> From https://github.com/apache/incubator-mynewt-core
> * branch            master     -> FETCH_HEAD
> Current branch mybranch is up to date.
> 
> [amit@discworld apache-mynewt-core]$ git push
> 
> fatal: The current branch mybranch has no upstream branch.
> To push the current branch and set the remote as upstream, use
> 
>   git push --set-upstream origin mybranch
> ---------------------------------------------------------------------------------------
> 
> Which i obviously cannot do (upstream mybranch), as I do not
> have commit rights to remote repo, i.e.
> 'https://github.com/apache/incubator-mynewt-core.git/)
> 
> So, what is the way of working for "rework on pull request"
> 
> [1] https://cwiki.apache.org/confluence/display/MYNEWT/Submitting+Pull+Requests
> [2] https://stackoverflow.com/a/7947337
> 
> Thank you for your help.
> 
> -Amit
> 
> P.S.
> I did ask this same question on mynewt slack, but didn't get any
> response; weekend effect I guess :)
> --
> Sent from Bahamas, while drinking chi-chi and piña colada.


Re: [Off-topic] Way of working for PR rework

Posted by Fabio Utzig <ut...@apache.org>.
On Sat, Jul 1, 2017, at 06:57 PM, amit mehta wrote:

> So, what is the way of working for "rework on pull request"

Pierre's answer is correct. But you seemed to already have a PR open
(https://github.com/apache/mynewt-core/pull/358/). You don't need to do
everything again, you just add the commit to that same branch you used
(mybranch), push, and it automatically shows up on the PR.

PS: "mybranch" is not supposed to be used literally, you should use a
descriptive name like "add-eclipse-mqtt" or similar. You could still do
it now by running "git checkout -b add-eclipse-mqtt" while in "mybranch"
but then you'd have to open a new PR, and so on, so keep it in mind for
future PRs!

> I did ask this same question on mynewt slack, but didn't get any
> response; weekend effect I guess :)

Yup, it probably is, but Slack and IRC are not real-time. You have to be
more patient!

Cheers,
Fabio Utzig