Skip to content

Instantly share code, notes, and snippets.

@micwehrle
Last active December 13, 2017 20:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save micwehrle/cabf56795efd2ed25113 to your computer and use it in GitHub Desktop.
Save micwehrle/cabf56795efd2ed25113 to your computer and use it in GitHub Desktop.
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
# Git autocomplete stuff. Nifty.
source ~/.git-completion.bash
# Aliases
alias pull='git fetch -v; git merge origin/`echo $(__git_ps1 "%s")`'
alias push='git push origin HEAD'
alias gits='git status'
alias gitf='git diff '
alias ll='ls -la'
# Git Aliases
function glog ()
{
DEF=0
MAX=${1:-$DEF}
echo `git describe`
git log --pretty --no-merges --format="- %s%n%b" --since="$(git show -s --format=%ad `git rev-list --tags --max-count=1 --skip=$MAX`)";
}
alias nb='git checkout -b "$USER-$(date +%s)"' # new branch
alias ga='git add . --all'
alias gb='git branch'
alias gc='git commit -a'
alias gcm='git checkout master && git pull'
alias gco='git checkout'
alias gd='git diff'
alias gl='git log'
alias gmm='git merge master'
alias gs='git status'
alias gf='git diff'
alias gt='git tag'
alias gu='git pull' # gu = git update
alias gdt='git tag -d $1; git push origin :refs/tags/$1'
alias ghtag="cat ~/githelp.txt"
alias gh="cat ~/.bash_profile |grep -v gh= | grep alias --color"
alias glog="glog"
# docker aliases
alias d="docker"
alias dm="docker-machine"
alias dc="docker-compose"
alias dlist='docker ps'
# Cool prompt from Chris Desalvo
export PS1='\h:\[\033[1;31m\]\w$\[\033[0m\]$(__git_ps1 " (%s)") '
# edit commandline using vi
set -o vi
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
# increase number of file descriptors to be useable (default is 256)
# gulp is crying if this is default
ulimit -S -n 2048
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment