git discard all local changes/commits and pull from upstream
git reset --hard origin/master
git pull origin master
git discard all local changes/commits and pull from upstream
git reset --hard origin/master
git pull origin master
| # Given a single argument, being the folder to a local copy of the npm package to "install" | |
| # copy it to the local node_modules folder, then make sure it has no node_modules of its own. | |
| # This way you can npm install locally afterwards to cover remaining dependencies and | |
| # everything will work right. | |
| function npm_import { | |
| export pkgname=`basename $1` | |
| export pkgdir="node_modules/$pkgname" | |
| if [ -d "$pkgdir" ]; then | |
| rm -rf "$pkgdir" | |
| fi |