Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bhacaz/git-hooks
Personnal Git Hooks
https://github.com/bhacaz/git-hooks
Last synced: 10 days ago
JSON representation
Personnal Git Hooks
- Host: GitHub
- URL: https://github.com/bhacaz/git-hooks
- Owner: Bhacaz
- License: mit
- Created: 2017-08-24T19:57:08.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-17T20:44:46.000Z (over 5 years ago)
- Last Synced: 2024-11-15T07:31:49.229Z (2 months ago)
- Language: Shell
- Size: 9.77 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# git-hooks
To enable the hooks, copy the scripts into your `{git-project-folder}/.git/hooks` and make it executable (`sudo chmod +x {hook_script}`.
## General
### prepare-commit-msg
Change the commit message to add the prefix of the branch. Useful when working with JIRA (ticket number)_Example_:
Branch name : _**ABCD\_1234**\_\_something_
_**ABCD-1234**_ will be added to the commit message if it not already.
## Ruby
### pre-commit1. Run _rubocop_ and auto correct Ruby files, add those corrections to commit.
2. Add `# frozen_string_literal: true` in new file.### pre-push
Run RSsec on _*spec.rb_ file that differ of the remote branche.# Git Alias
[.gitconfig](https://gist.github.com/Bhacaz/4f289c9d1962145619ef9c9f874afdce)