summaryrefslogtreecommitdiff
path: root/.config/fish/functions/git_sync_all.fish
diff options
context:
space:
mode:
authorRoger Gonzalez <roger@rogs.me>2023-03-18 16:40:57 -0300
committerRoger Gonzalez <roger@rogs.me>2023-03-18 16:40:57 -0300
commit8600374371f91843064441113f4023cda1730877 (patch)
treebb4677ec186dd5c323f1f010207076b7df285606 /.config/fish/functions/git_sync_all.fish
parentc95dd49df12f4f8dc13cf3bdc4dad70a060bd5eb (diff)
General fish fixes and updates
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