1

I was searching a lot for the proper solution but I didnt find anything similar.

I have a branch which I was working and a pull request of that. I needed to make another branch to cherry-pick some of the commits. But this branch is from another backup branch of the first branch. My question is how to update the existing pull request which I used for far?

Any additional info about is welcome and will be helpful.

Thank you in advanced.

b10n1k
  • 567
  • 5
  • 21

1 Answers1

0

The pull request is on a branch on the remote repo:

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • What I ask is about the last step. To make it clear I have already a tmp(lets say new_tmp) branch but not by the original branch but by another tmp/backup branch. I wonder if i give a commit --amend and a push will do it automatically or if it will push the new_tmp branch itself. Notice that the new_tmp is cloned by tmp. Does this make any different for the existing pr. I need to update the existing pr with the new_tmp branch. – b10n1k Apr 13 '14 at 00:44
  • @b10n1k as long as you are pushing to the `pr` branch (`push` or `push --force` after a `git commit --amend`), that will update the PR automatically. – VonC Apr 13 '14 at 00:47
  • Ok I did a git commit --amend and a git push -f myremote new_tmp but the pr did not update automatically. Instead, now i see a new "compare & pull request" on github. – b10n1k Apr 13 '14 at 10:41
  • @b10n1k did you push it to the branch where the pr already exist? See http://stackoverflow.com/a/14681796/6309 – VonC Apr 13 '14 at 10:41
  • i pushed using git push -f myremote myremote/branch_with_ex_pr. it doesnt work. What I am doing wrong? – b10n1k Apr 14 '14 at 08:09
  • @b10n1k why repeating `myremote`? It should be `git push -f myremote branch_with_ex_pr` – VonC Apr 14 '14 at 08:47