Skip to content

Instantly share code, notes, and snippets.

@StuStirling
Last active February 16, 2021 09:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StuStirling/40c8d134691ac09a193c8fc80b7ac202 to your computer and use it in GitHub Desktop.
Save StuStirling/40c8d134691ac09a193c8fc80b7ac202 to your computer and use it in GitHub Desktop.
Things I have found useful in the past relating to GIT
# Push tags matching specific pattern (this example will match all tags starting with "release/")
git tag -l "release/*" | xargs -n 1 -I% git push origin %
# Output list of ticket ids that have been merged since the last commit. Replace `HEAD^1` with a specific commit id if you like.
git rev-list HEAD^1..HEAD --oneline --date-order | grep "\[EXEP-.*\]\|\[SS-.*\]" -o | sort -u | tr -d '[',']'
# Get the short version of the current commit hash
git rev-parse --short HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment