I have a local git repo on my workstation which I push to a dropbox location so that I can pull it down to my laptop via git pull remote dropbox
.
Yesterday I checked in a change on my workstation, committed it and git push dropbox
'ed it. I did not do a git pull
from my laptop because I suspected that I was going to end up throwing that commit away.
Today I decided to throw that commit away, so on my workstation I did:
git reset --hard HEAD~1
So far, so good. Now I want to push this back up to Dropbox, so that on my laptop I can merge and commit from there. So on my workstation I tried:
git push dropbox
And git complained that:
! [rejected] master -> master (non-fast-forward) error: failed to push some refs to '\My Dropbox\dev\repos\xcast.git' To prevent you from losing history, non-fast-forward updates were rejected Merge the remote changes (e.g. 'git pull') before pushing again. See the 'Note about fast-forwards' section of 'git push --help' for details.
How do I get my worstation and Dropbox back in sync again?