aboutsummaryrefslogtreecommitdiff
path: root/.zsh_aliases
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2021-02-20 23:51:51 +0100
committerCharles Cabergs <me@cacharle.xyz>2021-02-20 23:51:51 +0100
commitabe2b612c9f672039894766e72fbba356c7bcfdc (patch)
treef6f3b209a69244a80a94087e4fc24c606804f4e1 /.zsh_aliases
parent22fb4594ec830f0072e9f0b45bac3a5f19897987 (diff)
downloaddotfiles-carbon.tar.gz
dotfiles-carbon.tar.bz2
dotfiles-carbon.zip
Added auto detecting current branch for pushing to all remotescarbon
Diffstat (limited to '.zsh_aliases')
-rw-r--r--.zsh_aliases2
1 files changed, 1 insertions, 1 deletions
diff --git a/.zsh_aliases b/.zsh_aliases
index e94fd89..7c59352 100644
--- a/.zsh_aliases
+++ b/.zsh_aliases
@@ -72,7 +72,7 @@ alias grv="git remote -v"
alias gra="git remote add"
gpa() {
branch="$1"
- [ -z "$1" ] && branch=master
+ [ -z "$branch" ] && branch=$(git branch | grep '^\* .*$' | cut -d ' ' -f 2)
git remote | xargs -I{} git push {} "$branch"
}
gpaf() {