Skip to content

Instantly share code, notes, and snippets.

@epeters3
Last active June 7, 2024 15:59
Show Gist options
  • Save epeters3/343015ffdee133578ad236269adb26f0 to your computer and use it in GitHub Desktop.
Save epeters3/343015ffdee133578ad236269adb26f0 to your computer and use it in GitHub Desktop.
My Favorite Bash Aliases ❤️
# Allows executing `watch` on an alias. Source: https://unix.stackexchange.com/a/25329
alias watch="watch "
# GIT
alias gl="git log --oneline"
alias gri="git rebase --interactive"
alias gpfo='git push --force-with-lease origin $(git branch --show-current)'
alias gcm="git checkout master"
alias grm="git rebase master"
# Create and checkout a new branch.
alias gcb="git checkout -b"
alias gp="git pull"
# Push the current branch to the remote origin.
alias gpo='git push origin $(git branch --show-current)'
# Delete all merged branches that are not the remote origin branch.
alias gbd="git branch --merged | grep -v -e main -e master | xargs git branch -d"
alias gb="git branch"
alias gss="git standup -s -m 3"
alias gs="git stash"
alias gsp="git stash pop"
alias poe="poetry run poe"
alias up1="cd .."
alias up2="cd ../.."
alias up3="cd ../../.."
alias up4="cd ../../../.."
@epeters3
Copy link
Author

epeters3 commented Jun 7, 2024

Add these to your ~/.bash_aliases file via:

curl https://gist.githubusercontent.com/epeters3/343015ffdee133578ad236269adb26f0/raw/aliases.sh >> ~/.bash_aliases

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