For demonstration purposes I have rewritten a post-commit hook (which was originally developed for Linux) for Windows.
post-commit (Linux version)
#!/bin/sh # POST-COMMIT HOOK # The post-commit hook is invoked after a commit. # # [1] REPOS-PATH (the path to this repository) # [2] REV (the number of the revision just committed) # REPOS="$1" REV="$2" echo $REPOS $REV >> /tmp/test.txt |
post-commit.bat (Windows version)
@echo off :: POST-COMMIT HOOK :: The post-commit hook is invoked after a commit. :: :: [1] REPOS-PATH (the path to this repository) :: [2] REV (the number of the revision just committed) :: @echo off set REPOS=%1 set REV=%2 echo %REPOS% %REV% > C:/Temp/test.txt |