'Is there any possibility to create commit message templates on azure DevOps repositories?
I just want to create some standard commit messages for repositories, is this feature available? Are there any workarounds?
Solution 1:[1]
You can add code into your .git/hooks/prepare-commit-msg hook that will alter message in the way you want:
#!/bin/bash
COMMIT_MSG_FILE=$1
# Only add custom message when there is no commit source
# ($COMMIT_SOURCE is empty). Otherwise, keep the default message
# proposed by Git
if [[ -z "$COMMIT_SOURCE" ]]
then
echo "Default message template goes here" > "$COMMIT_MSG_FILE"
fi
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Justinas |
