Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/metov/metovhooks
My personal git hooks.
https://github.com/metov/metovhooks
git git-hooks hacktoberfest2021
Last synced: 14 days ago
JSON representation
My personal git hooks.
- Host: GitHub
- URL: https://github.com/metov/metovhooks
- Owner: metov
- License: mit
- Created: 2021-06-23T02:06:24.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-10-09T22:04:54.000Z (about 3 years ago)
- Last Synced: 2024-10-04T21:16:09.189Z (about 1 month ago)
- Topics: git, git-hooks, hacktoberfest2021
- Language: Python
- Homepage:
- Size: 23.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Personal Git Hooks
This directory contains some scripts designed for use as [git hooks](https://git-scm.com/docs/githooks). 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](https://github.com/metov/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.