Jamesp1989
Jamesp1989

Reputation: 335

When a GitHub fork gets updated how do I keep my fork current while I still have a pending pull request?

I'm working on a fork of a project and I send a pull request. But the repo I forked from gets updated when I still have a pending push. How do I keep upto date without losing my changes from the pull request?

Upvotes: 0

Views: 625

Answers (1)

ThiefMaster
ThiefMaster

Reputation: 318508

The commits from your pull request should be in a different branch.

So you can simply git pull upstream and git merge --ff-only upstream/master (ensure that you are in your master branch first: git checkout master) to bring your master branch up to date (assuming the original repo is in a remote called upstream)

Upvotes: 4

Related Questions