Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Select branch in git dependency

Tags:

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.

like image 866
Pablo Cegarra Avatar asked Feb 14 '19 11:02

Pablo Cegarra


People also ask

What are Git dependencies?

Paket allows you to automatically manage the linking of files from any Git repository. This feature assumes that you have git installed. If you don't have git installed then Paket still allows you to reference files from GitHub.

How do I use dependencies on GitHub?

Under your repository name, click Settings. In the "Security" section of the sidebar, click Code security and analysis. Read the message about granting GitHub read-only access to the repository data to enable the dependency graph, then next to "Dependency Graph", click Enable.


1 Answers

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 
like image 94
Pablo Cegarra Avatar answered Sep 18 '22 19:09

Pablo Cegarra