Recently I needed to test a branch of a forked GitHub repository inside a project. Instead of cloning the fork and symlinking the package locally, I installed the remote dependency directly into the project.
To achieve I used the following command:
Using NPM:
npm install user/repo.git#branchname
Using Yarn:
yarn add ssh://git@github.com:user/repo.git#branchname
💡 If you’re targeting a specific commit or tag, replace branchname
with the commmithash
or tagname
Thank me with a coffee.
I don\'t do this for profit but a small one-time donation would surely put a smile on my face. Thanks!
To stay in the loop you can follow @bramus or follow @bramusblog on Twitter.