Created
March 28, 2024 09:01
-
-
Save KleaTech/ae789c9a33364b364317a9b41ad16024 to your computer and use it in GitHub Desktop.
Macos .zshrc file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias cmd='open -a Terminal "`pwd`"' | |
npr() { npm run $@ } | |
export PATH="/opt/homebrew/bin:$PATH" | |
clear() { printf '\33c\e[3J' } | |
export PATH="/opt/homebrew/opt/openjdk@11/bin:$PATH" | |
gitPruneBranches() { git fetch -p && for branch in $(git for-each-ref --format '%(refname) %(upstream:track)' refs/heads | awk '$2 == "[gone]" {sub("refs/heads/", "", $1); print $1}'); do git branch -D $branch; done } | |
gitMergeMain() { git rev-parse --abbrev-ref HEAD | read currentBranch && git checkout main && git pull && git checkout $currentBranch && git merge main -m "merge | |
main" } | |
gitCheckoutUnderMain() { git add . && git stash && git checkout main && git stash pop && git checkout -b $1 } | |
gitMergeRelease() { git rev-parse --abbrev-ref HEAD | read currentBranch && git checkout release && git pull && git checkout $currentBranch && git merge release -m | |
"merge release" } | |
killByPort() { sudo kill -9 $(lsof -t -i $1) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment