https://github.com/fanweixiao/git-hooks
git hooks demo
https://github.com/fanweixiao/git-hooks
Last synced: about 2 months ago
JSON representation
git hooks demo
- Host: GitHub
- URL: https://github.com/fanweixiao/git-hooks
- Owner: fanweixiao
- Created: 2012-12-11T16:45:47.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-12-14T09:32:02.000Z (over 12 years ago)
- Last Synced: 2025-02-14T13:47:53.329Z (4 months ago)
- Language: Shell
- Size: 121 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# git hooks demo
## post-receive
hope this framework could simplify your git-hooks-writing-job
### `repos` file
may be you have many remote repos, iterate them in this file as a array for saving time.
### `post-receive` file
use `post-receive` as a **post-receive hub**, running all post-receive jobs. There are two ways run jobs:
- `echo "$input" | hooks/post-receive-three` will run `post-receive-three` script
- `for i in `ls hooks/post-receive-job-* 2>/dev/null`; do` will run all script which name start w/ **post-receive-job-**### `post-receive-job` file
This hook script will execute proper command you want in senarios below:
+ git push origin new_branch_name
+ git push origin some_branch
+ git push origin :some_branch_to_be_delete
+ git push --tags