Commit hooks, scripts run when you commit to your repository, can be handy and are readily adaptable to a variety of workflows. Here is a quick and dirty post commit hook that I use for my dotfiles, remind files, and my todo list. These are kept in lightweight git repositories. Moreover, I want to push any changes that are committed immediately. Easily done:
$ cd my_git_repository
$ echo 'git push' > .git/hooks/post-commit
$ chmod 755 .git/hooks/post-commit
Post a Comment