I read a few explanations for a broken git push, but none of them seem to cover this case.
I cannot redirect my local changes to a remote repository even after pulling out and without conflicts.
$ git pull
Already up-to-date
$ git st
nothing to commit (working directory clean)
$ git push
To ssh://<url>
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'ssh://<url>'
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.
<url> - This, of course, is the real URL of my repository.
There are no changes in pull, there are no conflicts, and I'm not sure what else could lead to failure.
I believe that everything is correctly configured:
$ git remote -v
origin ssh:
origin ssh:
$ git branch -v
master 175a09d [behind 18] openReview must now be called from thread other than main.
* unstable c9e5cab Progress on attachments.
In the past, I just deleted my local repository. However, this happens more often.
- What caused this?
- How can I avoid this in the future?
- How can i fix this?
source
share