revert the git last commit and apply it to github for deployment scripts

we made a commit recently which we need to revert, successfully we were able to revert this change and apply it to github doing the following

git reset --hard HEAD~1
git push -f

the problem is, our deployment script is rejecting the changes. The way our deployment scripts work is, they pull from development branch and merge it with staging branch to reflect new changes following these steps

  • Ansible: how to run task on other host inside one playbook?
  • Create a git tag with submodule
  • Programmatically printing git revision and checking for uncommitted changes
  • How can I delete all Git branches which have been merged?
  • why git clone do nothing in my php
  • How to move git commits from master to a different existing branch
  • git checkout development
    git pull
    git checkout staging
    git pull
    git merge development # it is refusing to merge at this stage 
    git push

    anyone can help on how we can revert the last commit and make it reachable for our deployment scripts?


  • Formatting Git Log for HTML
  • how to pop git stash without triggering an auto-merge
  • Pushing git subtree info/structure to remote and to cloned copies
  • Add SourceTree Remotes Programmatically
  • Howto merge a svn repository with a git cloned repository (imported from SVN via github)
  • `git push` — No output, nothing happens
  • One Solution collect form web for “revert the git last commit and apply it to github for deployment scripts”

    You can’t merge with an ancestor of a commit. Either you are going to need to do a git revert and make a new commit, reverting the changes, or override the behavior of your deployment scripts somehow.

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