sirzento
sirzento

Reputation: 695

Your branch and 'origin/master' have diverged but overwrite server

I just did this here and deleted some of my first commits.
After the last step I got this
Your branch and 'origin/master' have diverged, and have 27 and 32 different commits each, respectively (use 'git pull' to merge the remote branch into yours)

I now want to push this to github so that only the 27 commits I currently have local are shown on github.

Do I only need to make a normal push?

(Other questions ask how to solve this Problem with merging but I want to throw away whats on the Server and overwrite it with my local datas so the first commits doesnt Exits anymore)

Upvotes: 1

Views: 1096

Answers (1)

dan1st
dan1st

Reputation: 16338

If you want to completely override the remote commits you may use git push -f (force push).

Upvotes: 3

Related Questions