tags:

views:

34

answers:

2

I had to revert to a previous commit by running:

 git revert <HASH>

So I go push the changes back into my remote repo and it failed with:

 ! [rejected]        ci_172 -> ci_172 (non-fast-forward)
 To prevent you from losing history, non-fast-forward updates were rejected
 Merge the remote changes before pushing again.  
A: 

You need made a pull before

git pull origin
git push origin

The pull made a fetch and merge from origin. After this merge you can push your commit

shingara
A: 

You are going to need to force the push with git push [remote-path] +[branch]. So, if I was pushing master to origin, that would look like git push origin +master.

You can see more at How can I remove a commit on github?.

Benjamin Manns