diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index a9dd4d7..b5958a9 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -37,7 +37,9 @@ alias gd="git diff ':!*package-lock.json' ':!*pnpm-lock.yaml' ':!*yarn.lock'" alias gds="git diff --staged ':!*package-lock.json' ':!*pnpm-lock.yaml' ':!*yarn.lock'" alias gdd="git diff HEAD^ -- ':!*package-lock.json' ':!*pnpm-lock.yaml' ':!*yarn.lock'" alias gpod="git push origin --delete" -alias gcm="git checkout master" +alias gcm="git checkout main 2>/dev/null || git checkout master 2>/dev/null || echo 'no main or master branch found'" +alias gbda="git branch | grep -v main | xargs git branch -d" +alias gbDa="git branch | grep -v main | xargs git branch -D" # navigation alias se="goto ~/.secrets" diff --git a/zsh/context.zsh b/zsh/context.zsh index 0d19e3d..d2e7982 100644 --- a/zsh/context.zsh +++ b/zsh/context.zsh @@ -16,9 +16,6 @@ function context_switch() { # autoswitch_conda_env context=$(echo $PWD | sed -E 's/^\/Users\/emurphy\/code\/([^/]+).*$/\1/') - git config --global user.name "edwmurph" - git config --global user.email 20996513+edwmurph@users.noreply.github.com - unset SPACES_ACCESS_KEY_ID unset SPACES_SECRET_ACCESS_KEY unset DIGITALOCEAN_ACCESS_TOKEN diff --git a/zsh/env.zsh b/zsh/env.zsh index 084d32e..6f1d8cf 100644 --- a/zsh/env.zsh +++ b/zsh/env.zsh @@ -1,4 +1,5 @@ export PATH=$PATH:/Users/emurphy/Library/Python/3.8/bin +export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" export GPG_TTY=$(tty) export FZF_DEFAULT_COMMAND='ag --hidden --ignore .git --ignore dist --ignore .aws-sam --ignore coverage -g ""' export BAT_THEME='TwoDark' diff --git a/zsh/init/init.zsh b/zsh/init/init.zsh index f39f408..48e2e39 100644 --- a/zsh/init/init.zsh +++ b/zsh/init/init.zsh @@ -13,3 +13,9 @@ function goto() { # initialize on new shell goto + +git config --global user.name "edwmurph" +git config --global user.email 20996513+edwmurph@users.noreply.github.com +git config --global push.default current +git config --global --add --bool push.autoSetupRemote true +git config --global core.excludesfile ~/.gitignore