I was just making a change on my webpage but had a conflict I tried to resolve on my server. After fixing my conflict, I committed, then I pulled. The pull said it was up to date. Then attempting to push I got this:
git push origin master
To git@gitlab.com:admenergy/admnet.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@gitlab.com:admenergy/admnet.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.
So I tried to force it, I ran this:
git push origin +master
Total 0 (delta 0), reused 0 (delta 0) To git@gitlab.com:admenergy/admnet.git + 94eec00...8002858 master -> master (forced update)
But then I logged into my git repository and all it did was delete my last 59 commits.... Can someone explain to me why this happened? Also, how should I go about fixing it from here?
Thank you,
Aucun commentaire:
Enregistrer un commentaire