Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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-commit

1. 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)