为什么要去要求我选择一个分支



我想安装mongodb-driver。当我键入此命令

go get go.mongodb.org/mongo-driver/mongo

我得到了:

    #  cd /Users/jiangwei/go/src/go.mongodb.org/mongo-driver; git pull --ff-only
    There is no tracking information for the current branch.
    Please specify which branch you want to merge with.
    See git-pull(1) for details.
    git pull <remote> <branch>
    If you wish to set tracking information for this branch you can do so with:
    git branch --set-upstream-to=origin/<branch> master
    package go.mongodb.org/mongo-driver/mongo: exit status 1

可能是因为您已经将该存储库签到了您的GO路径,并已更改为非默认分支。最简单的纠正方法是删除该存储库,然后从头开始。

rm -rf $(go env GOPATH)/src/go.mongodb.org/mongo-driver

当然,这将失去您在该存储库中所做的任何更改。

相关内容

  • 没有找到相关文章

最新更新