Skip to content

post-commit tips

post-commit hook is a git hooks function that runs when "all commits complete".

git hooks is a hook function that launches custom scripts. (See the official documentation for details.)

Example(Japanese)

The following article presents python code to create a post-commit shell script.

【Pythonバージョン管理】git hookを使用してコミットをトリガーにpyproject.tomlとgit tagを更新するスクリプトについて

Code

create_post-commit.sh

1
git clone https://gist.github.com/7rikazhexde/89036d5fc849411b925e6da7d4986b52

post-commit

It can be created by running create_post-commit.sh.

1
git clone https://gist.github.com/7rikazhexde/6ada2a6ef3ca23938bfa62f32e3fbed8

Comments