Git Product home page Git Product logo

githooks's Introduction

How to use

Move the files to an appropriate place, create files with same name in the .git/hooks/ folder of your repositories and run these scripts from them (also change the path for the sorting python script in the pre-commit hook) and give them permission to execute with chmod +x filename

You can also directly copy them into yout .git/hooks/ folder if you are sure you won't need to add something to all of your repositories later.

Useful links

http://schacon.github.io/git/githooks.html

http://githooks.com/

https://medium.com/beyond-the-manifesto/prepending-your-git-commit-messages-with-user-story-ids-3bfea00eab5a

http://mgrebenets.github.io/tools/2015/06/04/jira-id-in-git-commit-messages

https://github.com/pre-commit/pre-commit-hooks/blob/master/pre_commit_hooks/sort_simple_yaml.py

https://gist.github.com/marteinn/be178f437e17ade4a14aa838a07d95fa

https://github.com/square/spacecommander

Other cool stuff you can try with git hooks

  • Squash the branch and add the original commit hash "pre-rebase"
  • Run tests in "post-update" and automatically open pull request (create a config file that tells the script whether you want to make a pull request after successful test and what should be the included message)

githooks's People

Contributors

cyberbeni avatar

Stargazers

Amine Bensalah avatar Andor Fitos avatar Narcis avatar Tim Kersey avatar Péter Krassay avatar

Watchers

evandrix avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.