0

我想安装 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
4

1 回答 1

2

可能是因为您已经将该 repo 签出到您的 Go 路径中,并且已更改为非默认分支。纠正它的最简单方法是删除该 repo,然后从头开始。

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

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

于 2019-07-01T07:27:05.920 回答