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
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?
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.