Skip to content

Instantly share code, notes, and snippets.

@rdj
Created October 3, 2011 19:57
Show Gist options
  • Select an option

  • Save rdj/1260067 to your computer and use it in GitHub Desktop.

Select an option

Save rdj/1260067 to your computer and use it in GitHub Desktop.
[alias]
st = status -s
log1 = log --format=oneline
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
d = diff --color-words
sh = show --color-words
up = "!rdj_git_up() { if [[ -z `git status --porcelain` ]]; then local back=$(git name-rev --name-only HEAD); echo ======== fetch origin ========; git fetch origin && git remote prune origin && for r in devel master; do echo ======== fast-forward $r ========; git checkout $r && git merge --ff-only origin/$r; done && now=$(git name-rev --name-only HEAD); [[ $now != $back ]] && echo ======== checkout $back ======== && git checkout $back; else echo Repo is not clean; fi }; rdj_git_up"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment