我尝试将一个新分支推送到我在github上的远程存储库。我收到错误消息‘无法将某些引用推送到'https://github.com/tararoys/SurveyDBC.git’
git push -u origin TLR/Refactoring-Practice
error: src refspec TLR/Refactoring-Practice does not match any.
error: failed to push some refs to 'https://github.com/tararoys/SurveyDBC.git'
Taras-MacBook-Air:SurveyDBCGroupProject tlroys$ git push -u origin TLR-Refactoring-Practice发布于 2014-02-09 03:52:32
仅当远程分支的名称与本地分支的名称完全相同时,以下命令才有效。
git push -u origin TLR/Refactoring-Practice 不起作用,因为本地分支名称在TLR和Refactoring之间有一个破折号,而不是反斜杠。
git push -u origin TLR/Refactoring-Practice #does not work
git push -u origin TLR-Refactoring-Practice #works您可以重命名远程分支。为了这样做,命令应该是
git push -u origin TLR-Refactoring-Practice:TLR/Refactoring-Practice这将远程分支命名为TLR/Refactoring-Practice。
https://stackoverflow.com/questions/21650972
复制相似问题