我创建了一个分支,并运行以下命令:
git push [branchname]
我知道了
fatal: The current branch [branchname] has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream [branchname] [branchname]
然后我跑了
git push --set-upstream [branchname] [branchname]
我知道了
fatal: [branchname] does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
我该如何解决?我希望有一个终端解决方案,谢谢!
答案 0 :(得分:0)
您的本地分支似乎没有上游。首先,使用
找出您的远程跟踪存储库git remote -v
大多数时候你会得到
origin git@xxx (fetch)
origin git@xxx (push)
这意味着您有一个名为origin
的遥控器。因此,您可以使用
git push origin <local_branch_name>