Last active
March 16, 2021 01:55
-
-
Save andrewdieken/3abaab9324ddeec88e599e72f2bacc45 to your computer and use it in GitHub Desktop.
Personal GitHub aliases (i define these within my `.bash_profile`)
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
## | |
## misc. aliases | |
## | |
alias da="deactivate" | |
alias c="clear" | |
alias bk="cd .." | |
alias rf="rm -rf" | |
## | |
## zsh extensions | |
## | |
# Colorls aliases | |
alias l='colorls --group-directories-first --almost-all' | |
alias ll='colorls --group-directories-first --almost-all --long' # detailed list view | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
# Initialize 'z' command | |
. $(brew --prefix)/etc/profile.d/z.sh | |
# Enable tab completion for flags | |
source $(dirname $(gem which colorls))/tab_complete.sh | |
# alias for thefuck brew package | |
eval $(thefuck --alias) | |
## | |
## git aliases | |
## | |
alias glp='git log --pretty=format:"%h - %an, %ar : %s" | tail -n $1' | |
alias gplm="git pull origin master" | |
alias gcom="git checkout master" | |
alias gst="git status" | |
alias gbr="git branch" | |
alias gdf="git diff" | |
function gst_first_file () { | |
gst | grep gears -m 1 | grep -o 'gears.*' | |
} | |
alias gdff='git diff "$(gst_first_file)"' | |
alias gsu="git submodule update" | |
alias gmm="git merge master" | |
alias gco="git checkout" | |
alias gcob="git checkout -b" | |
alias gcm="git commit -m" | |
alias ga="git add" | |
## git add all | |
alias gaa="git add ." | |
alias gbrd="git branch -D" | |
alias gcb="git rev-parse --abbrev-ref HEAD" | |
alias gpl='git pull origin "$(gcb)"' | |
alias gpsh='git push origin "$(gcb)"' | |
## clear all current unstaged changes | |
function gcla () { | |
git add . | |
git stash | |
git stash clear | |
} | |
alias gfa='git fetch --all' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment