How do I run msysgit in cmder?

后端 未结 3 2131
粉色の甜心
粉色の甜心 2020-12-14 08:54

I was using msysgit and git-bash in cmder when I accidentally exited out of it.
Now I can\'t seem to figure out how to get to the unix environment I previously had.

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-14 09:53

    An easy way to get this working is to define a custom "bash" task in Cmder, and then configure it to use this task by default.

    • Install cmder_mini (msysgit is already installed, so no need for full version)
    • In Cmder, open settings: Win + Alt + P
    • Under Startup > Tasks, add a task called {bash} with the following settings:
      • Task parameters - set the icon:
        • Either /icon "%CMDER_ROOT%\cmder.exe" (for Cmder icon) or /icon "C:\Program Files (x86)\Git\etc\git.ico" (for Git icon)
      • Commands - open Git's bash shell:
        • "C:\Program Files (x86)\Git\bin\sh.exe" -l -new_console:d:%USERPROFILE%
    • Under Startup, set startup options to Specified name task --> {bash}

    ...this will set Git bash as the default console in Cmder.

    nb. The above obviously assumes that Git is installed in "C:\Program Files (x86)\Git" - if that's not the case, you'll need to change the path to point to wherever Git is installed.

提交回复
热议问题