Saturday, January 8, 2011

Using GIT on windows without starting a new cmd

If you install the portable GIT from for windows you will need to set the installation path in to your PATH variable in windows. And when you start git from the command line it will open another command line which is opened in your home directory. This was something made me go crazy so i though to find away to run git within the command line i opened like i do with SVN. Well i didn't try the windows installation in msysGit site and try the same thing with the command line because i always prefer zipped installations on windows. I guess that's some thing you can try :).

So when going through the git-cmd.bat file i found away to get it running as i wanted. Here is what you need to do.

Create the following environment variable with the values :
  • git_install_root = "[folder where you extracted the zip file]"
Add the following entries to the PATH variable :
  • %git_install_root%\bin;%git_install_root%\mingw\bin;%git_install_root%\cmd;
Now open the new command line and type git. You will get the git help text :).