Skip to content

Instantly share code, notes, and snippets.

@maxRN
Last active March 23, 2022 14:08
Show Gist options
  • Save maxRN/38312c47349b021be8f607294d00c9bd to your computer and use it in GitHub Desktop.
Save maxRN/38312c47349b021be8f607294d00c9bd to your computer and use it in GitHub Desktop.
Search through git log history by regex pattern
#!/bin/bash
git log --extended-regexp --grep="JIRA-[[:digit:]]+" --pretty="format:%h %ar %n >>%s<< %n"
# %h = commit ID short
# %ar = date
# %s = subject line
# %n = newline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment