I'm trying to create a more useful list of commits for reporting, and would like to format commit messages made in the following format:
Merged PR 5678: [12345] here's my awesome git commit message
Into the this format:
12345 - 2020-06-02 - Merged PR 5678: [12345] here's my awesome git commit message - Joe Bloggs
What i have so far:
git log --grep=Merged --pretty="%ad - %s - %an" --date=short
Which returns:
2020-06-02 - Merged PR 5678: [12345] here's my awesome git commit message - Joe Bloggs
But i don't know where to start in extracting the number from brackets and adding it as a variable to the pretty mask, is this possible?