0

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

error img

Cindy Meister
  • 25,071
  • 21
  • 34
  • 43
Himanshu Sharma
  • 511
  • 5
  • 12
  • 3
    Possible duplicate of [! \[rejected\] master -> master (fetch first)](https://stackoverflow.com/questions/28429819/rejected-master-master-fetch-first) – Roman Mar 07 '19 at 21:15

2 Answers2

1

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.

eftshift0
  • 26,375
  • 3
  • 36
  • 60
1

tell you fetch first so just try this

$ git push origin master --force

Or

$ git push origin master -f

it is same

Abdulrahman
  • 775
  • 6
  • 19