Git intercepts local commands

I recently wrote git hooks for my project team. I would like to know if developers make various commits locally without following the standard commit message patterns. then they push these commits. Will clicking fail because commits do not match the pattern?

The desired result would be that they can perform locally at their discretion, and then are forced to follow the structural path when they return to the main corporate branch.

Thoughts? Is this the best practice?

+3
source share
1 answer

Trick: git hooks are not published (pushed / pulled)

, , (pre-receive update) ( , ), .
, / (git commit --amend, ).

:

  • Git
  • , --template, .
    . git init.

, , ( n )

, .

+6

Source: https://habr.com/ru/post/1757151/


All Articles