38

Its possible to select some branch in the pubspec.yaml?

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

I need to use the develop branch instead master.

Pablo Cegarra
  • 20,955
  • 12
  • 92
  • 110

1 Answers1

94

Ok, from flutter doc (https://dart.dev/tools/pub/dependencies):

If you want to depend on a specific commit, branch, or tag, add a ref argument:

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

The ref can be anything that Git allows to identify a commit.

Vladimir Ignatev
  • 2,054
  • 1
  • 20
  • 34
Pablo Cegarra
  • 20,955
  • 12
  • 92
  • 110