【问题标题】:Select branch in git dependency在 git 依赖中选择分支
【发布时间】:2019-07-08 10:01:12
【问题描述】:

可以在pubspec.yaml中选择某个分支吗?

  library_sdk:
    git:
      url: git://github.com/library/library.git

我需要使用develop分支而不是master。

【问题讨论】:

    标签: flutter flutter-dependencies


    【解决方案1】:

    好的,来自 Flutter 文档 (https://dart.dev/tools/pub/dependencies):

    如果你想依赖特定的提交、分支或标签,请添加一个 ref 论据:

     dependencies:   
         kittens:
           git:
             url: git://github.com/munificent/kittens.git
             ref: some-branch
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-09-23
      • 1970-01-01
      • 2023-01-26
      • 2023-03-03
      • 2014-04-15
      • 1970-01-01
      • 1970-01-01
      • 2013-04-27
      相关资源
      最近更新 更多