Ask HN: Is there a way to enforce Git merges/commits?

1 points by chrisan ↗ HN
I was curious if there was a way to enforce 2 things on a git repo in either bitbucket or github

1) A JIRA-XXX format at the start of each commit. This makes sure we can relate/find a commit with a ticket/issue/feature and vice versa

2) Require merges to be rebased/squashed

2 comments

[ 1.7 ms ] story [ 11.7 ms ] thread
(1) at least could probably be done with a hook on commit or push. It’s also not all that difficult to inculcate culturally. Many teams just do this as part of agreed upon process without any explicit enforcement necessary.
Oh we have agreed upon the process certainly... its just that sometimes people get lazy/forgetful and I hate being the git log nazi reviewing code all the time. Oh well.

I'll checkout the hook thx