Skip to content

Instantly share code, notes, and snippets.

@inakiarroyo
Last active November 2, 2017 15:25
Show Gist options
  • Save inakiarroyo/973b2623cf93dffa8ddc3ca0670d2c2d to your computer and use it in GitHub Desktop.
Save inakiarroyo/973b2623cf93dffa8ddc3ca0670d2c2d to your computer and use it in GitHub Desktop.
Git aliases
# Remove local branches no longer on remote, also keeping master and not pushed local branches
alias cleanupgit="git checkout master && git fetch -p && git branch -vv | awk '/: gone]/{print }' | xargs git branch -d"
# Opens the browser on the specific associate Jira ticket with the current git branch
alias jira="git rev-parse --abbrev-ref HEAD | sed -E 's/.*(futrli|FUTRLI|Futrli)(-)([0-9]+).*/\1\2\3/g' | xargs -I{} open https://crunchboards.atlassian.net/browse/{} "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment