git pull:告诉它要与哪个分支合并

git pull:告诉它要与哪个分支合并,git,github,Git,Github,所以问题是,我有一个git存储库,我想把它上传到GitHub。我在SOF上运行了多个线程,它建议使用git push-u origin master。问题是,当我这样做时,它告诉我需要先合并,这样我就不会丢失任何数据。所以它建议我拉git。我做到了,这就是我得到的: You asked me to pull without telling me which branch you want to merge with, and 'branch.master.merge' in your confi

所以问题是,我有一个git存储库,我想把它上传到GitHub。我在SOF上运行了多个线程,它建议使用git push-u origin master。问题是,当我这样做时,它告诉我需要先合并,这样我就不会丢失任何数据。所以它建议我拉git。我做到了,这就是我得到的:

You asked me to pull without telling me which branch you
want to merge with, and 'branch.master.merge' in
your configuration file does not tell me, either. Please
specify which branch you want to use on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details.

If you often merge with the same branch, you may want to
use something like the following in your configuration file:
    [branch "master"]
    remote = <nickname>
    merge = <remote-ref>

    [remote "<nickname>"]
    url = <url>
    fetch = <refspec>

See git-config(1) for details.
你让我拉,但没有告诉我你是哪根树枝
要与合并,请在中“branch.master.merge”
您的配置文件也没有告诉我。请
指定要在命令行和命令行上使用的分支
再试一次(例如“git pull”)。
有关详细信息,请参见git pull(1)。
如果经常与同一分支合并,则可能需要
在配置文件中使用类似以下内容:
[分行“主控”]
远程=
合并=
[远程“”]
url=
获取=
有关详细信息,请参见git配置(1)。
我该如何解决这个问题

编辑:没关系,我只是修复了这个。如果你们遇到这样的问题,请:
git pull

假设您的分支称为master,远程称为origin:

git pull origin master
如果尚未设置遥控器,则执行此操作的命令为:

git remote add origin git@github.com:username/repository.git

在这两种情况下,Origin只是github远程服务器的通用名称。将用户名替换为用户名,将存储库替换为存储库名称。在此之后,您将能够将您的github存储库称为“origin”。

当然,当您可以询问stackoverflow时,为什么要按照git的指示(
重试(例如“git pull”)
)@杰夫,你会想结束这个问题,接受一个已有的答案,或者发布你自己的答案并接受它。否则这个问题将仍然“没有答案”。