Last active
May 11, 2022 14:29
-
-
Save rleroi/85be73da9371a841ce6bdb979cd920ed to your computer and use it in GitHub Desktop.
Aliases [Mac OS]
This file contains hidden or 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
##################################### | |
# 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" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great