StingyJack
StingyJack

Reputation: 19479

Using pull requests to update a fork from its upstream parent

I was trying to update my fork from its parent and having trouble, so I asked someone for help and in the course of the conversation the other party stated...

Pull requests cannot be used to update a fork from it's upstream parent

... which does not make sense to me (especially since that is what I eventually did to sync my fork from its origin).

I'm not asking how to sync a fork - that's covered in a few questions already - I don't understand why applying commits via pull request is "bad" when compared to other ways (reparenting my/local to origin/remote and reversing the usual commit path).

If it matters, the branches and relations look like this

- origin/remote (has the commits I want)
 - my/remote (where I want to put them - originally forked from origin/remote)
  - my/local (where I dont want to put them - yet. cloned from my/remote)

Once my/remote is updated, I would expect to "Sync" or "fetch" my/remote to my/local. I would not expect to follow a path different than the one I used to fork or clone to create them.

Upvotes: -1

Views: 78

Answers (1)

Vampire
Vampire

Reputation: 38734

Of course you can use PRs to update a fork from its parent. You can also use PRs to update a fork from another fork. But PRs are not really meant for this. PRs are meant for people that do not have push access to the target or need a code review, so that you can tell "hey I want this merged in" and the receiver can review it and then apply or deny it.

For updating your fork from upstream you should just add the upstream as another remote and then rebase your branches against the upstream branches.

Upvotes: 1

Related Questions