Opening Git Bash (windows) in certain folder from shortcut?
-
Does anyone know how to do this? I keep all my code on
D:\Code\
which is
/d/code/
In git bash.
-
@lucas1 said in Opening Git Bash (windows) in certain folder from shortcut?:
Does anyone know how to do this? I keep all my code on
D:\Code\
which is
/d/code/
In git bash.
given that gitbash has a right click explorer shortcut to open the cmd prompt in the current folder
and that the shortcut for it on the start menu is......
"C:\Program Files\Git\git-bash.exe" --cd-to-home
i use my psychic powers to determine that the magic invocation is......
"C:\Program Files\Git\git-bash.exe" --cd-to /d/code/
Let's see if i'm right....NOPE!
it's actually
"C:\Program Files\Git\git-bash.exe" --cd="d:\code"
thanks stack overflow for having the command options to that exe when the standard "what do you support?" queries didn't work on the exe directly.
-
@accalia Sweet that works like a charm
"%ConEmuDir%\..\Git\git-cmd.exe" --cd="d:\code" --command=usr/bin/bash.exe -l -i
That works in ConEmu as well.
-
@accalia who needs Stack Overflow (or an internet connection, for that matter) when you have Process Explorer? Just use the explorer context menu shortcut and look at the command line in Process Explorer ;)
-
@LB_ who needs Process Explorer when you have regedit? Just look under HKEY_CLASSES_ROOT\Directory\shell - there's a key for each custom context menu entry, with full command written.
-
@LB_ said in Opening Git Bash (windows) in certain folder from shortcut?:
@accalia who needs Stack Overflow (or an internet connection, for that matter) when you have Process Explorer? Just use the explorer context menu shortcut and look at the command line in Process Explorer ;)
because google was faster? (given PE wasn't installed)
-
@Gąska said in Opening Git Bash (windows) in certain folder from shortcut?:
HKEY_CLASSES_ROOT\Directory
Or HKEY_CLASSES_ROOT\Folder\shell\ if you want to include drives.
Edit: never mind. This would be for adding your own command instead of checking an existent one.
-
@Zecc didn't know about Folder. Always used Directory and then copied over to Drive.