我也一直在使用带有远程仓库的 git 分支(Bit bucket)
我决定创建一个新分支,所以运行了这段代码
Directory= ~/tmp/merge/aaa> git branch iOSUI/beta
Directory= ~/tmp/merge/aaa> git checkout iOSUI/beta
Switched to branch 'iOSUI/beta'
然后试着推
Directory= ~/tmp/merge/aaa> git push origin iOS7UI/beta
error: src refspec iOS7UI/beta does not match any.
error: failed to push some refs to 'https://xxx/repo.git'
所以我尝试创建一个远程分支
Directory= ~/tmp/merge/aaa> git branch origin iOSUI/beta
error: there are still refs under 'refs/heads/origin'
fatal: Failed to lock ref for update: Is a directory
失败后,我通过选择 push 尝试了 XCode,然后它成功推送到
'起源/iOS7UI/测试版'
我再次尝试了命令行 2 选项
Directory= ~/tmp/merge/aaa> git push origin iOS7UI/beta
error: src refspec iOS7UI/beta does not match any.
error: failed to push some refs to 'https://xxx/repo.git'
and this option with the '/'
Directory= ~/tmp/merge/pixtr> git push origin/iOS7UI/beta
fatal: 'origin/iOS7UI/beta' does not appear to be a git repository
fatal: Could not read from remote repository.