I tried to push changes in my local branch(local_dev) to a remote branch(develop), I used below command, but it gave me an unexpected message after executing the command.
$ git push origin local_dev :develop
message after command execution:
Counting objects: 1941, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (838/838), done.
Writing objects: 100% (1378/1378), 265.47 KiB | 0 bytes/s, done.
Total 1378 (delta 604), reused 863 (delta 257)
remote: error: refusing to delete the current branch: refs/heads/develop
To https://github.com/MyCompany/MyProject.git
* [new branch] local_dev -> local_dev
! [remote rejected] develop (deletion of the current branch prohibited)
error: failed to push some refs to 'https://github.com/MyCompany/MyProject.git'
Any suggestions on this why this should happen?
Thanks.