I want Git bash to execute a .exe file just by writing git filename.exe
. Indeed, I've got the cloc.exe file (which counts code lines) and I want to run it from Git Bash instead of from Windows CMD.
Asked
Active
Viewed 2,545 times
1 Answers
1
For that, your executable needs to be:
- on the
$PATH
(which can be defined in~/.bashrc
) - named
git-cloc.exe
Then you would be able to type, in a git bash session (or even in a CMD, if part of the %PATH%
):
git cloc
The idea is: any executable name git-xxx
allows you to type git xxx
(as long as it is found in the $PATH
)

VonC
- 1,262,500
- 529
- 4,410
- 5,250