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

  • In a ruby script, how to ask git to open its message editor
  • swipe activity to change another activity in android and show multiple Activity in a singleview?
  • Store custom metadata against individual files in a Git repository
  • Can Git detect if two source files are essentially copies of each others?
  • Error: Cannot pull with rebase: You have unstaged changes
  • What to do when new commits happen after a git rebase?
  • Git post-receive to checkout only those files that have been modified/added in the push?
  • Number of steps require to do a Git merge
  • Should I include .sass-cache with the repo when versioning a web project?
  • In Jetbrains IDEs, is there a way to see changed rows since a specific commit, instead of working copy changes?
  • Branch colours in the graph
  • Executing a git-hook after pull --rebase
  • 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.