duanchongchu5177 2017-07-10 11:17 采纳率: 0%
浏览 223
已采纳

如何在主仓库以外的github存储库的另一个分支中“获取”文件

I need to go get following files from this repo

go get github.com/mattes/migrate/driver/mysql

but those files are in a different branch, not in master. How can I go get those files? I tried following way but it didn't get those files that I need.

go get gopkg.in/mattes/migrate.v1

Appreciate any help.

  • 写回答

1条回答 默认 最新

  • douhui8163 2017-07-10 11:28
    关注

    This is not supported by go get, you need to download the files manually to your GOPATH or to your vendor/ folder.

    A vendor solution:

    git clone git@github.com:mattes/migrate.git
        vendor/github.com/mattes/migrate;
    cd vendor/github.com/mattes/migrate;
    git checkout BRANCH_NAME;
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥23 (标签-bug|关键词-密码错误加密)
  • ¥66 比特币地址如何生成taproot地址
  • ¥20 数学建模数学建模需要
  • ¥15 关于#lua#的问题,请各位专家解答!
  • ¥15 什么设备可以研究OFDM的60GHz毫米波信道模型
  • ¥15 不知道是该怎么引用多个函数片段
  • ¥30 关于用python写支付宝扫码付异步通知收不到的问题
  • ¥15 隐藏系统界面pdf的打印、下载按钮
  • ¥15 基于pso参数优化的LightGBM分类模型
  • ¥15 安装Paddleocr时报错无法解决