1.Fork the repository and clone it in locally
$ git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
2.Add remote from original repository in your forked repository:
$ cd into-your-repos-folder/cloned/fork-repo
$ git remote add upstream git://github.com/ORIGINAL-USER/REPO-YOU-FORKED-FROM.git
$ git fetch upstream
3.Updating your fork from original repo to keep up with their changes:
$ git pull upstream master
$ yarn install
$ npm install
(remember to use the --dev
flag if you need to save it as a development dependency)
Yarn has the --save
flag as a default.
$ yarn add <package-name> --dev
$ npm install <package-name> --save-dev
$ yarn remove <package-name>
$ npm uninstall <package-name>