News for hackers. Stuff that matters.
Re:Write good git commit messages by scrollaway on Thursday December 13, 2018 @02:40AM (#18670529)
This is IMO a potentially good system but it requires a lot of rigor. In my experience, such systems break down unless they are rigidly enforced, and that's never fun for anybody.
Re:Write good git commit messages by lysp on Sunday December 16, 2018 @01:16AM (#18691992)
The way I have set it up is to do 2 things:

1) Create a post-commit hook script that only allows commits into feature branches.

This prevents accidentally committing into the dev/master branches (it still allows merges).

2) Create a script file that all developers use to start / end features which handles all the branch creation, pushing and pulling. That way the process is standardised and you cant make a mistake.

eg.

* script startfeature abc123-this-is-new-feature

* script endfeature (this automatically picks up local open features)

The only time there is ever an issue is when the end-feature causes a conflict. This is solved by rebasing your local branch, fixing up any issues in your commmits and then ending it again.