Ravi
02/05/2024, 2:22 PMKevin Jump
02/05/2024, 2:40 PMPrenders
02/05/2024, 2:51 PMCorné Hoskam
02/05/2024, 3:03 PMRachel D
02/05/2024, 3:41 PMRavi
02/05/2024, 4:30 PMCorné Hoskam
02/05/2024, 5:59 PMMatt Wise
02/05/2024, 7:30 PMrasmusjp
02/05/2024, 9:06 PMRavi
02/05/2024, 10:49 PMskttl
02/06/2024, 11:30 AMtekoScott
02/06/2024, 11:39 AMDean Leigh
02/06/2024, 6:15 PMSebastiaan
02/06/2024, 7:05 PMskttl
02/07/2024, 7:33 AMRavi
02/07/2024, 9:14 AMCorné Hoskam
02/07/2024, 9:15 AMhttps://tenor.com/blk7w.gifâ–¾
Corné Hoskam
02/07/2024, 9:16 AMOwain
02/07/2024, 9:17 AMOwain
02/07/2024, 9:17 AMMark Drake
02/12/2024, 12:22 AMJason
02/12/2024, 11:21 AMRavi
02/12/2024, 1:22 PMCraig100
02/12/2024, 6:01 PMCraig100
02/12/2024, 6:04 PMskttl
02/14/2024, 8:12 AMNik
02/15/2024, 3:46 PMRachel D
02/15/2024, 3:50 PMAmbert
02/18/2024, 11:23 AMOwain Jones
02/22/2024, 1:28 PMHarry Gordon
02/28/2024, 12:05 PMMatthew Hart
03/01/2024, 12:59 PMMike Chambers
03/16/2024, 2:05 PMprepare-commit-msg
eg
prompting/stamping the branch name on the start of the commit msg...
(It seems like most seem it to be swearing, but sourcetree was the only one I found... but I only tried over 18months ago)
bash
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
BRANCH_EXCLUDED=$(printf "%s\n" "${BRANCHES_TO_SKIP[@]}" | grep -c "^$BRANCH_NAME$")
BRANCH_IN_COMMIT=$(grep -c "$BRANCH_NAME" $1)
if [ -n "$BRANCH_NAME" ] && ! [[ $BRANCH_EXCLUDED -eq 1 ]] && ! [[ $BRANCH_IN_COMMIT -ge 1 ]]; then
sed -i.bak -e "1s/^/$BRANCH_NAME : /" $1
fi
Rachel D
03/16/2024, 2:40 PM