Skip to content

Instantly share code, notes, and snippets.

View wardis's full-sized avatar

Wardi Soulaimana wardis

View GitHub Profile
@wardis
wardis / gcamm: ticket + message
Last active September 5, 2025 03:36
Commit with Jira ticket prefix
gcamm() {
local branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
if [[ -z "$branch" ]]; then
echo "Not in a git repo!"
return 1
fi
local ticket=$(echo "$branch" | grep -oE '[A-Z]+-[0-9]+')
if [[ -z "$ticket" ]]; then
echo "No ticket ID found in branch name!"