I am trying to deploy to a remote server and this is the error I get –
git push uat release/1.1:release
To ubuntu@ubuntu-jvm:/repos/tms/uat
! [rejected] release/1.1 -> release (non-fast-forward)
error: failed to push some refs to 'ubuntu@ubuntu-jvm:/repos/tms/uat'
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
When I try pulling from the remote this is the error I get:
git pull uat release:release/1.1
remote: Counting objects: 58, done.
remote: Compressing objects: 100% (33/33), done.
remote: Total 35 (delta 17), reused 8 (delta 0)
Unpacking objects: 100% (35/35), done.
From ubuntu-jvm:/repos/tms/uat
! [rejected] release -> release/1.1 (non-fast-forward)
I have a bare git repo at the remote location.
How do I resolve it?
Your two repositories are out of sync. You will need to handle any merge conflicts on your local repository, and then push again.