Skip to content

Instantly share code, notes, and snippets.

@rleroi
Last active May 11, 2022 14:29
Show Gist options
  • Save rleroi/85be73da9371a841ce6bdb979cd920ed to your computer and use it in GitHub Desktop.
Save rleroi/85be73da9371a841ce6bdb979cd920ed to your computer and use it in GitHub Desktop.
Aliases [Mac OS]
#####################################
# Some useful aliases for sharing. #
# Some by me, some found on the web #
#####################################
# Laravel Artisan
alias starthorizon='./artisan horizon'
alias stophorizon="kill \$(ps aux | grep 'php ./artisan horizon' | grep -v grep | head -n1 | awk '{print \$2}') 2> /dev/null && echo 'Horizon stopped'"
alias horizon='stophorizon; starthorizon;'
# Git
alias commit='git commit -am'
alias status='git status'
alias push='git push'
alias pull='git pull'
alias merge='git merge'
alias pick='git cherry-pick'
alias add='git add'
alias pushup='git push --set-upstream origin $(git branch --show-current)'
alias checkout='git checkout'
alias resetfile='git checkout HEAD -- '
# push current changes to staging branch and go back to your branch
stage() {
local BRANCH=$(git branch --show-current);
push && checkout staging && pull && merge $BRANCH && push && checkout $BRANCH
}
# Other
alias listen="lsof -nP -iTCP | grep LISTEN"
@miladd3
Copy link

miladd3 commented Sep 4, 2021

Great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment