https://github.com/networm/git-check-useless-merge
Deny push if first parent of last merge commit is not remote branch.
https://github.com/networm/git-check-useless-merge
git
Last synced: about 2 months ago
JSON representation
Deny push if first parent of last merge commit is not remote branch.
- Host: GitHub
- URL: https://github.com/networm/git-check-useless-merge
- Owner: networm
- License: mit
- Created: 2017-03-11T13:56:49.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-11T13:59:38.000Z (over 9 years ago)
- Last Synced: 2025-03-26T01:37:36.986Z (over 1 year ago)
- Topics: git
- Language: Ruby
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Git check useless merge
Deny push if first parent of last merge commit is not remote branch.
To preserve a clean git history.
## Usage
```
cp update /path/to/repository/.git/hooks
chmod +x /path/to/repository/.git/hooks/update
```
## Environment
- Git
- Ruby
## Reference
- [Git - An Example Git-Enforced Policy](https://git-scm.com/book/en/v2/Customizing-Git-An-Example-Git-Enforced-Policy)
- [git push - Git receive/update hooks and new branches - Stack Overflow](http://stackoverflow.com/questions/3511057/git-receive-update-hooks-and-new-branches)