Basu
Basu

Reputation: 11

TortoiseGit pre commit hooks (shell script)

I implemented git pre-commit hook (shell script) and they are working fine in Linux environment, I tried to implement same shell script pre-commit hooks in TortoiseGit but nothing is happening, As windows not support shell scripts so tried to change the shebang line to refer to shell.exe of git still no luck, does anybody knows how to implement pre-commit (shell script) hook in TortoiseGit?

Upvotes: 1

Views: 3241

Answers (1)

MrTux
MrTux

Reputation: 33993

TortoiseGit comes with it's own hooks, since it's not always possible control when the git.exe hooks are executed.

See https://tortoisegit.org/docs/tortoisegit/tgit-dug-settings.html#tgit-dug-settings-hooks

TortoiseGit also allows you to store your hooks in the repository (here, of course, you need to consider security aspects).


Git for Windows comes with a reliable *nix environment. Therefore, shell scripts should work in general (w/o modifications from *nix).

If you want to debug your vanilla Git hooks, call git commit from the command line.

Upvotes: 3

Related Questions