How to add tool to open Git shell in repository from msysgit (GUI)?
Is there a quick command that I can put in so that if I run this tool it will open a shell which is set to the repo’s directory? I have searched everywhere and it seems I cannot find a command that will work!
- How do I force git to use LF instead of CR+LF under windows?
- Git config alias doesn't work anymore
- git clone over ssh from remote repository:fatal: protocol error: bad line length character: fata
- How do i enable syntax highlighting and syntax indentation in msysgit vim?
- msysgit git-am can't apply it's own git format-patch sequence
- gitolite push error -> remote: ENV GL_RC not set
I finally found out how to do it:
cmd /c cd %v & start "" "C:\path\to\bin\sh.exe" --login -i
The reason why you have to pass an empty argument to the
start command is because the first argument in quotes gets set as the window title. So, if you want to name your window, do this:
cmd /c cd %v & start "WINDOW TITLE HERE" "C:\path\to\bin\sh.exe" --login -i
cmd /c cd %v– Changes your current directory to the path of the repo.
start "WINDOW TITLE HERE" "C:\path\to\bin\sh.exe" --login -i– Starts up your shell, setting the window to
WINDOW TITLE HERE, and passing
--login -ito the executable
One Solution collect form web for “How to add tool to open Git shell in repository from msysgit (GUI)?”
cmd /c cd %v & start C:/path/to/bin/bash -il