Git two competitive commits in different branches -


i've got situation:

  1. i preparing fix issue.
  2. i did pull request upstream remote.
  3. another person preparing fix issue.
  4. another person doing better fix; pull request has been accepted.
  5. my pull request rejected.

what best thing can origin remote head?

you need fetch origin, , rebase current branch on top of it.
enough.

git pull --rebase upstream 

you might want checkout branch 1 using fix, though, since doesn't make sense reapply commits fix has been accepted (with different commits different pull request).

this assumes have remote repo address declared in local repo named 'upstream', refering original repo have forked.
once have rebased work in progress on top of updated upstream, can push origin (your fork).

fork on github


Comments