https://github.com/randomecho/git-minimal
Display a minimal maxim by The Minimalists after each git commit.
https://github.com/randomecho/git-minimal
aphorisms bash git githook minimalism post-commit python3 scraping
Last synced: 10 months ago
JSON representation
Display a minimal maxim by The Minimalists after each git commit.
- Host: GitHub
- URL: https://github.com/randomecho/git-minimal
- Owner: randomecho
- License: bsd-3-clause
- Created: 2018-07-05T18:36:46.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-11T19:42:15.000Z (over 7 years ago)
- Last Synced: 2025-01-31T11:50:08.625Z (12 months ago)
- Topics: aphorisms, bash, git, githook, minimalism, post-commit, python3, scraping
- Language: Python
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Git Minimal
Display a minimal maxim by The Minimalists after each git commit.
## Setup
To use the Python version (created in a Python 3.4 environment)
you will need to install some modules:
pip install BeautifulSoup4 requests
To use the Bash shell script version `wget` needs to be installed.
If you don't know if `wget` exists on the machine check for it with:
which wget
If the path to `wget` does not show, it's not installed.
## Install
Move the script into the hooks directory of the desired repo
and re-initialise:
mv post-commit.py /path/to/repo/.git/hooks/post-commit
cd /path/to/repo/
git init
Note: There is no file extension when planted into the hooks directory.
It is just "post-commit".
### Global install
Set a global store of all the Git hooks like so:
git config --global init.templatedir '/path/to/global/git_templates'
mkdir -p /path/to/global/git_templates/hooks
mv post-commit.py /path/to/global/git_templates/hooks/post-commit
To update existing repos, re-initialise:
git init
The example command line instructions reference the Python script.
To use the Bash shell script instead, swap out
**post-commit.py** for **post-commit.sh**.
## License
[BSD 3-Clause](http://opensource.org/licenses/BSD-3-Clause)