My personal git hooks.
Project description
Personal Git Hooks
This directory contains some scripts designed for use as git hooks. They should have a pretty simple command line interface (see docstrings for details) so usage should be self-explanatory.
Installation
You can install the entire hook package with pip install metovhooks
.
Usage
You can run the scripts manually in your shell. For example, protect_branch master
will exit with code 1 if the current git branch is master
and exit with 0 if not (if your shell does not display exit codes, you can check the code with echo $?
).
Of course, it isn't very useful to run these manually. You can just type git status
and see what the current branch is. But these scripts are intended to be used as git hooks. This is why the commands themselves are verbose - you'd be reading them much more often than typing them. However, you still have the option of just typing them manually -- a useful thing when troubleshooting.
If you're looking for a tool to help you manage git hooks, check out yaghm. This repository also contains a yaghm config defining the hooks I use when developing it. This is optional; it won't actually do anything until you install yaghm and enable them.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for metovhooks-0.1.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b02634840ac9e4a89952f110e4c14c29c2d8ec5f88fdbedd33a05aaa70218db8 |
|
MD5 | 307ba2a8e96623bc26b70435778b1edd |
|
BLAKE2b-256 | 2bb409f6f5fb828c91df2e5696d0ef3f5ea076df3834174ab7cdd52be8bb6647 |