Daniel Hiller

Geek, programmer, father
I'm a software engineer with more than 20 years of work experience.
I strive to create software that is useful for people so they can do stuff that matters.

Using Infinitest for real
All posts
Git aliases, the easy way

Useful git aliases when working with Maven and Jira

2015-06-18

git alias 

Put these into your .gitconfig below the alias section:

    # Return all jira issue keys from commit messages
    issues = !sh -c 'git log --oneline $@ | egrep -o [A-Z]+-[0-9]+ | sort -V | uniq' -
    # Fetch id of latest commit from maven release plugin
    release-commit = !sh -c 'git log --all --grep=maven-release-plugin.*prepare.release --format=%H| head -1'
    # Return all jira issue keys since last usage of maven release plugin
    issues-since-release = !sh -c 'git issues $(git release-commit)..'
Related posts:

Using Infinitest for real
All posts
Git aliases, the easy way

Creative Commons License This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Last update on 2023-11-29. Built by dhiller using Atom (editor), Jekyll (site builder), OneDark vivid (syntax highlighting theme), Webjeda (related posts), Disqus (discussions), Github Pages (hosting), Cloudflare (DNS).