summaryrefslogtreecommitdiff
path: root/.config/fish/functions/git_sync_all.fish
diff options
context:
space:
mode:
Diffstat (limited to '.config/fish/functions/git_sync_all.fish')
-rw-r--r--.config/fish/functions/git_sync_all.fish6
1 files changed, 6 insertions, 0 deletions
diff --git a/.config/fish/functions/git_sync_all.fish b/.config/fish/functions/git_sync_all.fish
new file mode 100644
index 00000000..35a56b6a
--- /dev/null
+++ b/.config/fish/functions/git_sync_all.fish
@@ -0,0 +1,6 @@
+function git_sync_all
+ for branch in (git branch --all | grep '^\s*remotes' | egrep --invert-match '(:?HEAD|master)$');
+ git checkout (echo $branch | awk -F'/' '{print $1="\r"; $2="\r"; print;}' | xargs | sed 's/ /\//g');
+ git pull -p
+ end
+end