Shawn White
Shawn White

Reputation: 319

Force overwrite on master from a pull request?

I've got a pull request on GitHub that's dramatically different than my master (total redesign of the web app) and want to force it to be used as master. It can't automatically be merged because it's so different, but it's the version I want to use as master.

Is there a way to force an overwrite of master with the PR?

It's also a branch in the main repo, so if not could I rename that branch to master and get rid of the old master somehow?

Thanks for your help!

Upvotes: 1

Views: 1971

Answers (1)

SLaks
SLaks

Reputation: 887405

You can overwrite your current history with the PR branch:

git fetch <URL of fork>
git push -f origin fork/pr-branch:master

Beware that this will blow away your history and break all forks.

Upvotes: 3

Related Questions