From: Alexander Goussas Date: Fri, 24 Oct 2025 17:04:35 +0000 (-0500) Subject: docs: add Git hooks integration docs to README X-Git-Url: http://git.frustrated-labs.net/?a=commitdiff_plain;h=0783928e774f2a63a2dd98a36c38a6b2699a4c67;p=gradle-changelog-plugin.git docs: add Git hooks integration docs to README --- diff --git a/README.md b/README.md index 7a7e9c9..f3db15f 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,18 @@ better if a CHANGELOG accurately reflects Git history and vice-versa. ## Integrating with Git hooks +To run the `changelog` task whenever you push to your remote repository, you can copy paste the sample +pre-push hook script in `scripts/pre-push` to `.git/hooks/pre-push` and make sure the file is +executable: + +```bash +cp ./scripts/pre-push ./.git/hooks/pre-push +chmod +x ./.git/hooks/pre-push +``` + +The script will run the `changelog` task whenever you push and add a commit to include the +changelog changes. Feel free to edit the script to set the commit message to whatever you like. + ## Future work - [ ] Task option to "publish" a release