Git – Non-Fast-Forward Error

Standard

If you get the error below:

To origin.git
! [rejected] dev -> dev (non-fast-forward)
error: failed to push some refs to ‘origin.git’
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. ‘git pull’) before pushing again. See the
‘Note about fast-forwards’ section of ‘git push –help’ for details.

 

Simply add –force to your git push

 

Advertisements