Skip to content

Instantly share code, notes, and snippets.

@konstantinzolotarev
Last active November 10, 2016 11:29
Show Gist options
  • Save konstantinzolotarev/65b6bc681e9556ebb954f87739f2d5de to your computer and use it in GitHub Desktop.
Save konstantinzolotarev/65b6bc681e9556ebb954f87739f2d5de to your computer and use it in GitHub Desktop.
export NVM_DIR=~/.nvm
source $(brew --prefix nvm)/nvm.sh
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
alias nt='npm test'
alias ntm='npm run mocha'
# ----------------------
# Git Aliases
# ----------------------
alias ga='git add'
alias gaa='git add .'
alias gaaa='git add -A'
alias gb='git branch'
alias gbd='git branch -d '
alias gc='git commit'
alias gca='git commit -a'
alias gcm='git commit -m'
alias gco='git checkout'
alias gcob='git checkout -b'
alias gcom='git checkout master'
alias gd='git diff'
alias gda='git diff HEAD'
alias gi='git init'
alias gl='git log'
alias glg='git log --graph --oneline --decorate --all'
alias gld='git log --pretty=format:"%h %ad %s" --date=short --all'
alias gm='git merge --no-ff'
alias gp='git pull'
alias gpsh='git push --all'
alias gs='git status'
alias gss='git status -s'
alias gst='git stash'
alias gstl='git stash list'
alias gstp='git stash pop'
alias gstd='git stash drop'
# ----------------------
# Git Functions
# ----------------------
# Git log find by commit message
function glf() { git log --all --grep="$1"; }
function gsro() { git remote set-url origin $1; }
function gcc() { git commit -am $1; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment