Git is driving me mad. I forked a github repo and added some changes, then realised that I had made my changes on top of some commits after master.
In my local copy of the repo, I reset master
back to upstream/master
and then cherry picked the changes. Like this:
My change is "Add support for directed advertising mode". As you can see I accidentally did it on top of upstream/scheduling_policy
instead of upstream/master
.
The problem is when I try and push this, I get this error:
git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags --set-upstream origin master:master
Pushing to https://github.com/Timmmm/ble.git
To https://github.com/Timmmm/ble.git
... lots of [up to date]s ...
= [up to date] v2.5.2 -> v2.5.2
= [up to date] v2.6.0 -> v2.6.0
= [up to date] workingOldBootloader -> workingOldBootloader
! [rejected] master -> master (non-fast-forward)
Can someone tell me the totally intuitive command that I need to make it move the origin/master
branch to my local master
branch?