Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Combine Git Bash and opening in current folder in CMDER

Please describe me, who have such experience, how to correctly set the options of CMDER to open new console with Git Bash in current folder(Open CMDER here, for example). This string does not work:

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

I tried mix to this

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

and this

cmd /k "%ConEmuDir%\..\init.bat" -new_console:%__CD__%
like image 402
Edymov Avatar asked Oct 16 '25 03:10

Edymov


1 Answers

Your second option should have worked:

See this gist (also for Cmder):

  • Open Conemu
  • Open Settings -> Tasks or go to new tab button -> Setup tasks.
  • Click + to add a new task
  • Enter the name as Git Bash or whatever you like

Task parameters:

/icon "C:\Program Files (x86)\Git\etc\git.ico" /dir "C:\_git"

Command:

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

If you want to force your $HOME directory to be on local HD not network drive, you can do this as the command instead:

"set PATH=C:\Users\<username>;%PATH%" & "set HOME=C:\Users\Ndecarteret" & "C:\Program Files (x86)\Git\bin\sh.exe" --login -i 

This tutorial is quite complete too.

Note: your case could be related to issue 709.

like image 74
VonC Avatar answered Oct 17 '25 19:10

VonC