简体   繁体   中英

How to configure the windows git bash env?

I want to use a batch to start gitbash.

bash.bat:

"C:\Program Files (x86)\Git\bin\sh.exe" --login -i

but I can't use path env. for example:

  $ ruby -v
  sh.exe": ruby: command not found

How to configurate the env manually? for example: add ruby,java,maven env

As on linux, you should add it to your PATH . For example, add the following line in your ~/.bashrc :

export PATH=$PATH:/c/Ruby193/bin

and restart GitBash to take it into account

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM