diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2017-05-29 15:10:34 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2017-05-29 15:10:34 +0100 |
commit | 84c22e6c6401d4b28b96ce8ba00b3c3b173d5fa4 (patch) | |
tree | 91573c30a8f01328e6eea9d2aaeeb1252f522ccf /bashrc | |
parent | git pull prune delete-merged-branches (diff) | |
download | util-84c22e6c6401d4b28b96ce8ba00b3c3b173d5fa4.tar.bz2 util-84c22e6c6401d4b28b96ce8ba00b3c3b173d5fa4.tar.xz util-84c22e6c6401d4b28b96ce8ba00b3c3b173d5fa4.zip |
Functions for git splitting
Diffstat (limited to 'bashrc')
-rw-r--r-- | bashrc | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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() { |