I prefer to use git bash command line for manipulations with repository (push, pull, checkout, rebase, merge, git-tfs’ commands etc) and GUI for things like staging, merging files, viewing history, blaming etc. Thus I always have bash console opened at my repository root.
Unfortunately when I tried to run commit process via GUI I have this:
$ gitex sh.exe": gitex: command not found</blockquote>
From cmd.exe’s console everything is just working. cmd.exe in fact is calling gitex.cmd from GitExtensions’ root folder which is just settings paths and starts GitExtensions.exe with given command line arguments.
Bash just can’t run *.cmd file. Well, it is not a big problem. I just have to write my own script to do the same. It is strange that GitExtensions didn’t include this thing from the start. Or maybe I missed something?
Anyway, you need just file “gitex” (without extension) with this lines:
#!/bin/sh GitExtensions.exe "$@" &
$@ means to pass to GitExtensions.exe all command line arguments that were passed to the script and & means we want it to be started separately, i.e. mingw console should return immediately and do not wait until GitExtensions.exe process finished.
P.S. As a Windows user I also fallen into a trap of missing “#!/bin/sh” at the beginning and got same message. And ‘chmod a+x gitex’ to make it executable didn’t help either. It seems mingw determines executability of a file just by that header.