Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run Ruby and GIT commands in one place on Windows

I have Ruby and GIT installed on my windows box. To run GIT commands I am utilizing the GIT Bash. To run Ruby commands I am using the command line.

I have not been successful running GIT commands from the CMD line nor can I seem to run Ruby commands from inside the GIT Bash. I would love to be able to run commands for both GIT and Ruby from the GIT Bash (ideal) or at the least from the CMD line.

What is the best way to go about this?

like image 830
Joseph U. Avatar asked Aug 06 '10 17:08

Joseph U.


People also ask

Can I run Git commands on Windows?

All you have to do is load Command Prompt (Load the Start menu, then click "Run", type cmd and hit enter), then you can use Git commands as normal.


1 Answers

I run git commands from the CMD session all the time.

Make sure your PATH environment variable includes the 'cmd' directory from a msysgit distro:

Path=C:\Path\To\Git\1.7.1\cmd

If not, add it in your session:

set PATH=%PATH%;C:\Path\To\Git\1.7.1\cmd

and you are done. Git and Ruby commands in your CMD shell.

The reverse (Ruby commands) is possible in a Git bash, by adding to the PATH a value like /c/path/to/Ruby/186-27/bin

http://img842.i_mageshack.us/img842/8749/gitbashruby.png

like image 121
VonC Avatar answered Oct 07 '22 16:10

VonC