TortoiseGit Git Script Error Message

I created a Start Commit Hook in TortoiseGit that calls the StartComit.bat file and the parameter "Wait for the script to finish."

The contents of the bat file are

echo "Some more info...." >> %1 

The script receives the call until the Commit dialog opens, but it does not work, I do not receive the text in the "Message" field.

What am I doing wrong here?

Edit: just in order to make the question clearer, I am trying to fulfill this accepted answer https://stackoverflow.com/a/167609/ and do a similar thing.

+2
git windows pre-commit-hook tortoisegit batch-file
Jul 14 '16 at 10:27
source share
1 answer

% 1 - the path to the file containing all the selected files when starting the commit dialog, and not the path to the file for the message, %%.

See https://tortoisegit.org/docs/tortoisegit/tgit-dug-settings.html#tgit-dug-settings-hooks for a guide on options.

In this way,

 echo Some more info.... >> %2 

should solve this problem.

+3
Jul 14 '16 at 12:49
source share



All Articles