Created
July 3, 2015 16:27
-
-
Save tobyontour/9ccd050c87c7a362a822 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Put in .git/hooks/post-checkout | |
| # Makes doing timesheets a little easier. :-) | |
| # --- Command line | |
| oldrev="$1" | |
| newrev="$2" | |
| changed_branch="$3" | |
| if [ $changed_branch -eq "1" ] | |
| then | |
| if branch=$(git symbolic-ref -q HEAD) | |
| then | |
| echo "`date` Changed to $branch" >>~/checkout.log | |
| fi | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment