๐Ÿงถ
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

more config files (fish/git/git-hooks) and git-gone

+62 -1
+10
bin/git-gone
··· 1 + #!/bin/bash 2 + # Remove from local any branch already merged in origin 3 + git fetch --prune 4 + 5 + # What is this big guy doin? 6 + # 1. Exclude the currently checked-out branch 7 + # 2. Trim leading and trailing whitespace from each line 8 + # 3. Exclude the 'master' and 'main' branches from the list 9 + # 4. Delete each branch listed, one at a time 10 + git branch --merged | grep -v '\*' | sed 's/^ *//;s/ *$//' | grep -v -E '^(master|main)$' | xargs -n 1 git branch -d
+4
config/fish/config.fish
··· 1 + nvm use 24 2 + if status is-interactive 3 + echo "๏ผผ๏ผˆ๏ผพ๏ผ๏ผพ๏ผ‰ใƒŽ" 4 + end
+47
config/git-hooks/prepare-commit-msg
··· 1 + #!/bin/sh 2 + 3 + COMMIT_MSG_FILE="$1" 4 + COMMIT_SOURCE="$2" 5 + 6 + # This one is mainly for work 7 + # 1. Add Jira tag file in the commit message 8 + 9 + BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null) 10 + 11 + if [ -z "$BRANCH" ]; then 12 + echo "โš ๏ธ Could not determine current branch. Skipping tag injection." >&2 13 + else 14 + TAG=$(echo "$BRANCH" | grep -oE 'EX-[0-9]+' | head -n1) 15 + 16 + if [ -z "$TAG" ]; then 17 + echo "No Jira tag found in branch name '$BRANCH'. Skipping tag injection." >&2 18 + else 19 + # Only inject if the tag isn't already in the message (avoids duplicates on --amend) 20 + if ! grep -qF "$TAG" "$COMMIT_MSG_FILE"; then 21 + printf "\n%s" "$TAG" >> "$COMMIT_MSG_FILE" 22 + echo "Appended '$TAG' to the commit message." >&2 23 + else 24 + echo "'$TAG' already present in the commit message. Skipping." >&2 25 + fi 26 + fi 27 + fi 28 + 29 + # 2. Warn about unresolved TODOs 30 + 31 + REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null) 32 + 33 + if [ -z "$REPO_ROOT" ]; then 34 + echo "Could not determine repository root. Skipping TODO check." >&2 35 + else 36 + # Search whole repository and show file:line matches 37 + TODOS=$(cd "$REPO_ROOT" && grep -Rni --exclude-dir={.git,node_modules,coverage} --exclude=package-lock.json 'TODO' . 2>/dev/null) 38 + 39 + if [ -n "$TODOS" ]; then 40 + echo "" >&2 41 + echo "โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€" >&2 42 + echo "ส• โ€ขฬุˆโ€ขฬ€) Pending TODOs found:" >&2 43 + echo "$TODOS" >&2 44 + echo "โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€" >&2 45 + echo "" >&2 46 + fi 47 + fi
+1 -1
config/git/gitconfig
··· 5 5 [core] 6 6 pager = delta 7 7 editor = nvim --wait 8 - hooksPath = .git/hooks 8 + hooksPath = ~/.git-hooks 9 9 10 10 [pager] 11 11 branch = false