Git push failed after 'git reset –hard HEAD~1' of local repo

This question already has an answer here:

  • Git reset –hard and a remote repository

    4 answers

  • Running a Git build inside a ClearCase View in tcsh
  • git wildcard - remove all instances of a subdirectory
  • Why hudson/jenkins tries to make commit?
  • fatal: Not a git repository … error message
  • Removing unwanted files from git/github
  • How to organise git repos when building on a seed project
  • Attributing a single commit to multiple developers
  • Moved folder into submodule, now getting “Untracked files would be overwritten” message
  • Can I fetch a stash from a remote repo into a local branch?
  • How can I save an incompletely merged index in git?
  • Hg equivalent of “git log master..HEAD” when using bookmarks as lightweight branches?
  • how can i git clone git://foo.git AGAIN?
  • One Solution collect form web for “Git push failed after 'git reset –hard HEAD~1' of local repo”

    Force push should work: git push -f dropbox

    Git is complaining because your remote still has that extra commit, and thus you are behind it in terms of history.

    Git Baby is a git and github fan, let's start git clone.