0

Good day!

I want to check if the branch name is present in the comment of commit before commit it. I'am looking for a phpstorm plugin or other way. I need to do this on client site. Any suggestions?

  • 2
    Does this answer your question? [get commit message in git hook](https://stackoverflow.com/questions/5393178/get-commit-message-in-git-hook) – Keldorn Apr 27 '20 at 05:59
  • Oops, I just realized [Keldorn's link that I used for the close op](https://stackoverflow.com/questions/61452152/check-a-git-commit-comment-before-commit-check-for-the-name-of-the-branch-in-th#comment108706989_61452152) goes to a question that *doesn't* show how to get the current *branch name*. Let me find a secondary link too. – torek Apr 27 '20 at 06:16
  • 1
    Note my comment on the second link's question, that `git rev-parse --abbrev-rev HEAD` or `git symbolic-ref --short HEAD` is the way to go. – torek Apr 27 '20 at 06:18
  • Thanks, it looks like what I'm looking for – Vasiliy Letuyev Apr 27 '20 at 07:33

0 Answers0