]> git.frustrated-labs.net Git - gradle-changelog-plugin.git/commitdiff
docs: add Git hooks integration docs to README
authorAlexander Goussas <[email protected]>
Fri, 24 Oct 2025 17:04:35 +0000 (12:04 -0500)
committerAlexander Goussas <[email protected]>
Fri, 24 Oct 2025 17:07:58 +0000 (12:07 -0500)
README.md

index 7a7e9c9d675735ffbf534f2b0fa618e49169bee8..f3db15f285d6414eb2e1fcc5063bb5741e72edcd 100644 (file)
--- 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