In general I make small commits which solve one issue / task and aim not to mix up code refactoring with the actual task. In most cases a one liner is totally enough then. I also add the ticket number to get background information if necessary. In case it's a bug fix for a regression I add the commit hash that introduced it.
The one liner, ticket number and commit itself is fine for me. Yet this requires to set proper messages and a good maintained ticket.
Thus, tbh I sometimes catch myself not doing it. If possible I fix things by using the interactive rebasing then.
In general I make small commits which solve one issue / task and aim not to mix up code refactoring with the actual task. In most cases a one liner is totally enough then. I also add the ticket number to get background information if necessary. In case it's a bug fix for a regression I add the commit hash that introduced it.
The one liner, ticket number and commit itself is fine for me. Yet this requires to set proper messages and a good maintained ticket.
Thus, tbh I sometimes catch myself not doing it. If possible I fix things by using the interactive rebasing then.
Bottom line, as of now I am not using templates.
Yeah everyone got a different workflow. You can add a one liner template to remind you too. 😉