more helpers for git and tmux flow

This commit is contained in:
RingOfStorms (Joshua Bell) 2025-09-16 14:52:07 -05:00
parent cc79b2a6b2
commit 8ae9c6ecda
6 changed files with 123 additions and 18 deletions

View file

@ -103,11 +103,11 @@ forcepush () {
}
remote_branches () {
git branch -a | grep 'remotes' | grep -v -E '.*(HEAD|${DEFAULT})' | cut -d'/' -f 3-
git for-each-ref --format='%(refname:short)' refs/remotes 2>/dev/null | sed 's#^[^/]*/##' | grep -v '^HEAD$' || true
}
local_branches () {
git branch -a | grep -v 'remotes' | grep -v -E '.*(HEAD|${DEFAULT})' | grep -v '^*' | cut -d' ' -f 3-
git for-each-ref --format='%(refname:short)' refs/heads 2>/dev/null || true
}
prunel () {