0

We are using SourceTree and we have quite a lot of branches, but we use the convention of naming a branch by case like this:

FB5678

where 5678 represents the case number. Another convention we have is to have commit messages like this:

Case 5678 - Done the optimizations requested

I would like to have a text like

Case 5678 -

in the commit message box and to not have to type it each time I do a commit. This text is preferred for any normal commits, that is, not merges and not case closures or openings. Is this possible via setting things up or writing a script? How?

Lajos Arpad
  • 64,414
  • 37
  • 100
  • 175
  • Are you using bookmarks or named branches? – andref Aug 28 '16 at 23:29
  • We use named branches. Their names look like FB – Lajos Arpad Aug 29 '16 at 06:35
  • @LazyBadger, thank you for the suggestion. I will think about it. However, from a technical perspective, is there support for this, or is this not supported? – Lajos Arpad Aug 30 '16 at 09:00
  • I don't know ans use SourceTree, but from the side of pure Mercurial - hooks, something like [this](https://www.mercurial-scm.org/wiki/Hook#Automatically_add_a_.22Signed-off-by:.22_tag_line_to_commit_messages) precommit hook – Lazy Badger Aug 30 '16 at 10:40

0 Answers0