pyratelog

personal blog
git clone git://git.pyratebeard.net/pyratelog.git
Log | Files | Refs | README

commit 5a036ea6927bc6c309242f7e386a0a309ee67cb1
parent f83dd80ee69cd6dadfddaed5684d49a8d4b68d7d
Author: pyratebeard <root@pyratebeard.net>
Date:   Thu, 10 Nov 2022 15:07:02 +0000

what_the_hook

Diffstat:
Mentry/what_the_hook.md | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/entry/what_the_hook.md b/entry/what_the_hook.md @@ -33,3 +33,12 @@ For my wiki I make of the `post-commit` hook. #!/bin/sh git push origin master ``` + +That's it. Pretty simple really. All this means is that as soon as I make a commit the master branch is automatically pushed. + +This works great, but I wanted to go one step further to automatically adding changed files and making the commit. The `prepare-commit-msg` hook is useful when you want to populate the commit message with something, but I couldn't figure out an easy way to do what I wanted with hooks. + +In the end I used a command in my ~/.vimrc +``` +set :Gac git commit -a -m "updates" +```