Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Anachron
Created October 16, 2013 12:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Anachron/7006751 to your computer and use it in GitHub Desktop.
Save Anachron/7006751 to your computer and use it in GitHub Desktop.
Portable NodeJS & Git-Environment in Windows
Create folders:
-------------------
apps
msysgit
node
Download Programs:
-------------------
Msysgit portable (https://code.google.com/p/msysgit/downloads/list) inside msysgit
Node binary (http://nodejs.org/download/) --> inside node
NPM (http://nodejs.org/dist/npm/) --> inside node
Create Startscript (cli.cmd)
-------------------
start cmd /k "set PATH=%cd%\node;%cd%\node\node_modules\.bin;%cd%\msysgit\bin;%PATH% && set HOME=%cd%\msysgit\etc"
echo off
Add Aliases (cli.cmd)
-------------------
doskey gps=git push origin master
doskey gpl=git pull origin master
doskey gaa=git add -A
Edit NPM Config (if required)
-------------------
npm config set proxy http://domain:port/
npm config set https-proxy http://domain:port/
Download modules
-------------------
npm install [moduleName]
Configure Git
-------------------
Create .gitconfig into msysgit\etc\ and add
[user]
name = YourName Here
email = Your@email.here
@r-a-y
Copy link

r-a-y commented May 18, 2014

Thanks. This gave me some ideas.

Since I use msysgit's bash, I needed to copy the \node_modules\npm\bin\npm file to the root "node" directory for it to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment