DEV Community

Discussion on: Enforce git commit messages automatically

Collapse
 
piyushkmr profile image
Piyush Kumar Baliyan

That is a good idea to integrate these with git hooks (I already have some hooks setup for linting and type-checking), I can add the API integration as well (that way people won't have to learn new shortcuts). But how can I auto add username to new branch?

And regarding commit message hook, I saw that you can prefill the editor content using git-hooks, but inline modification of commit-message is little tricky to get through (OR I am missing something).

The custom functions I created are just derived from common aliases developers use, an I personally found it faster to type gpoh instead of git push origin HEAD and so on.

Thanks for the __git_ps1, I didn't know that, although I'll not be using the dirty check, as it add a delay to each terminal prompt.