1

I've got a recurring problem with GIT workflow in our company.

Each commit is required to have a link to task which current feature branch is based on. But when I have more than 100 commits on my feature branch, each time I need to copy that link from somewhere - it is time consuming and frustrating.

I've thought about adding a hook to .git in project directory - each time I create a new branch, I add information about link to some file (or even git branch), and when I commit something, it is automatically appended to commit message.

Is this even possible? Is there any other way to do it?

svantetic
  • 300
  • 1
  • 14
  • If you are mainly working from a single branch, you may use a local Git commit template, which would have the ticket number as part of the message. This approach would not work well should you be working on multiple issues concurrently. – Tim Biegeleisen Oct 17 '18 at 10:38
  • @gherkin This looks like an aswer for my post - if I can get branch description in `prepare-commit-message` then I can append it to commit message, which is something I was looking for. – svantetic Oct 17 '18 at 10:54

0 Answers0