Skip to content

Commit

Permalink
Add note about --git-ref to pub global (#5408)
Browse files Browse the repository at this point in the history
I wanted to know how to specify a commit for a package I want to
install, and I noticed that the option isn't in the documentation.

Co-authored-by: Parker Lougheed <[email protected]>
  • Loading branch information
nilsreichardt and parlough authored Dec 14, 2023
1 parent 0948944 commit c3b5881
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/tools/pub/cmd/pub-global.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ a path relative to the repository root:
$ dart pub global activate -sgit https://github.com/dart-lang/http.git --git-path pkgs/http/
```

Pub uses the default branch of the Git repository. To specify a
different branch or commit, use the `--git-ref` option:

```terminal
$ dart pub global activate -sgit https://github.com/dart-lang/http.git --git-ref 36f98e900347335af2338a0e087538009b7de2f9
```

### Activating a package on your local machine

```terminal
Expand Down

0 comments on commit c3b5881

Please sign in to comment.