Reputation: 41685
My current status is like the following:
A--B--C--O1--O2--O3 (origin/master)
\
L1--L2--L3 (master)
I want origin/master to look like
A--B--C--L1--L2--L3 (origin/master, master)
How can I do this?
Upvotes: 0
Views: 57
Reputation: 29821
You need to force a push to the server, like git push -f origin master
. Note that this will effectively make commits O1
, O2
and O3
get lost. Also, if someone else than you cloned the repo in between and still has the A--B--C--O1--O2--O3
history, that someone needs to git fetch
and git reset --hard origin/master
to get your force-pushed changes, overwriting his / her local history.
Upvotes: 3