在哪里可以找到创建远程仓库时要添加的名称(github)

Where can I find the name to add when creating a remote repo(github)

我用 Vcode 学习 git,但不明白如何启用“推送”到 GitHub

我在 GitHub 中创建了一个新的空回购协议

https://github.com/xxxx/testRepo.git

在 Vcode 中,我 select“推”它询问是否要设置一个新的遥控器,我 select 是并选择了 GitHub。一个包含我所有 GitHub 项目的列表,我 select testRepo.git.

然后它向我询问“远程名称”。 我在文档中读到该名称默认为“origin”(您从中克隆的位置),但 origin 是我在本地的代码,如果我写名称“origin”(唯一有效的名称),VCode 会要求我

'

此时我按取消并提出这个问题!

默认情况下,新创建的存储库上不会有任何远程分支。当您克隆一个空存储库时,它通常会自动创建一个跟踪 origin/master(本地)的 master 分支。因此,当你进行初始推送时,它会要求你设置一个远程分支来跟踪你的本地分支,在这种情况下它是主分支。

You can go ahead publish the changes, it is going to create a branch named master in the remote repository