One of the developers in my team is having the following issues. They have the ability to pull a remote branch which says it is all up to date, but they cannot push to that remote branch. The following is what they are getting in the Windows git command prompt
MY@MY-PC ~/documents/workspace/my-repository (workflowNewCOBRequest1)
$ git remote show origin workflowNewCOBRequest1
Enter passphrase for key '/c/Users/MY/.ssh/id_rsa':
* remote origin
Fetch URL: [email protected]:myorg/my-repository.git
Push URL: [email protected]:myorg/my-repository.git
HEAD branch: master
Remote branches:
2_Initial_COB_Submission tracked
COB_VF_email_template new (next fetch will store in remotes/origin)
Team-approval tracked
develop tracked
master tracked
testing tracked
workflowNewCOBRequest1 tracked
Local branches configured for 'git pull':
develop merges with remote develop
master merges with remote master
workflowNewCOBRequest1 merges with remote workflowNewCOBRequest1
Local refs configured for 'git push':
Team-approval pushes to Team-approval (up to date)
develop pushes to develop (local out of date)
master pushes to master (up to date)
MY@MY-PC ~/documents/workspace/my-repository (workflowNewCOBRequest1)
$ git push origin workflowNewCOBRequest1
Enter passphrase for key '/c/Users/MY/.ssh/id_rsa':
fatal: workflowNewCOBRequest1 cannot be resolved to branch.
fatal: The remote end hung up unexpectedly
I have searched the internet and cannot find anything resembling this. Any ideas?
Thanks
Paul
I spent an hour trying all sorts of stuff - nothing worked to get rid of the error. Finally, I decided to delete the local repo - and clone the remote repo again. Then everything started working just fine. Not ideal - but will work.
I had a similar problem using an old version of git
try
git version
and compare with someone who is not having the issue
Although, here it looks like the problem is that you don't have a local REF for pushing that branch back to the origin.
Does this work? It explicitly indicates which branch to push to (and from)
git push origin workflowNewCOBRequest1:workflowNewCOBRequest1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With