我团队中的一位开发人员遇到了以下问题.他们有能力拉出一个远程分支,说它是最新的,但他们无法推送到那个远程分支.以下是他们在Windows git命令提示符中获得的内容
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: git@github.com:myorg/my-repository.git Push URL: git@github.com: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
我搜索过互联网,找不到类似的东西.有任何想法吗?
谢谢
保罗
我使用旧版本的git遇到了类似的问题
尝试
git version
并与没有问题的人比较
虽然,在这里看起来问题是你没有本地REF将该分支推回到原点.
这有用吗?它明确指出要推送到(和)的分支
git push origin workflowNewCOBRequest1:workflowNewCOBRequest1