Skip to content

Instantly share code, notes, and snippets.

@hugueschabot
Created February 10, 2017 13:39
Show Gist options
  • Save hugueschabot/d23e41697fe77f5db20425a9198c362b to your computer and use it in GitHub Desktop.
Save hugueschabot/d23e41697fe77f5db20425a9198c362b to your computer and use it in GitHub Desktop.
Personal Git Alias Setup

My aliases

[alias]
	co = checkout
	up = !git pull --rebase --prune $@ && git submodule update --init --recursive
	ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
	ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
	fl = log -u
	bclean = "!f() { git branch --merged ${1-master} | grep -v " ${1-master}$" | xargs -r git branch -d; }; f"
	bdone = "!f() { git checkout ${1-master} && git up && git bclean ${1-master}; }; f"
	home = rev-parse --show-toplevel
	whereami = rev-parse --abbrev-ref HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment