From 84c22e6c6401d4b28b96ce8ba00b3c3b173d5fa4 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 29 May 2017 15:10:34 +0100 Subject: Functions for git splitting --- bashrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bashrc b/bashrc index e50372d..500f586 100644 --- a/bashrc +++ b/bashrc @@ -69,6 +69,12 @@ gppdmb() { PARENT=${1:-master} git checkout $PARENT && git pull --prune && git delete-merged-branches } +createAllBranches() { + for branch in $(git branch --all | grep '^\s*remotes' | egrep --invert-match '(:?HEAD|master)$'); do git branch --track "${branch#*/*/}" "$branch"; done +} +filterAllBranches() { + git filter-branch --subdirectory-filter $1 --prune-empty --tag-name-filter cat -d /tmp/$$ -- $(git branch | cut -b 3-) +} alias gst='git status' # Hg hgd() { -- cgit v1.2.3