Search code examples
gitazure-devopsjiragit-log

Git how display all log that had issue references


Git commit message can reference task id in the Jira or AzureDevOps by using hashtag like: #12345

I want to list all of the commits that contain the reference. Is there any command or tool to handle this?


Solution

  • If I understand correctly, maybe you can try the following from CLI, take the commit subject and then pipe it to grep to extract the desired info (e.g for commits with #numbers):

    git log --pretty=format:"%s"| grep -E '#[0-9]*'