# So you wanna yarn add a dependency from a git repo?


I'm posting this because, even if really basic stuff, I've bumped my head with this wall way too many times before successfully managing to accomplish the task: Use `yarn add` to pull a dependency while using a git repo as the source. It is, in fact, really simple (though I feel is way to verbose (? ):

``` bash
yarn add git+ssh://git@gitlab.com:organization/project
```

You can even specify use a branch or particular commit by adding it at the end, like this:

``` bash
# To point to a branch:
yarn add git+ssh://git@gitlab.com:organization/project#dev
# To point to a commit we just use the hash (short one is this case):
yarn add git+ssh://git@gitlab.com:organization/project#c8023772
```

It's also listed in the official docs: https://yarnpkg.com/lang/en/docs/cli/add/ So, have you ever had to do this? Do you find it useful?

