When I was trying to push my codebase to other user repository on which i have permission, I got stuck with this error. It is not even helping me to change the remote origin. It is showing
fatal: remote origin already exists
When I was trying to push my codebase to other user repository on which i have permission, I got stuck with this error. It is not even helping me to change the remote origin. It is showing
fatal: remote origin already exists
You are missing changes from the remote branch master (other developers probably pushed to that branch already), that's why git is rejecting to accept your changes. Normally, you would pull (fetch and then merge or rebase) with your local branch and then you should be able to push normally.
tell you fetch first so just try this
$ git push origin master --force
Or
$ git push origin master -f
it is same