Skip to content

Instantly share code, notes, and snippets.

@davidalpert
Created March 18, 2015 20:52
Show Gist options
  • Save davidalpert/78d607ddab66f04a1026 to your computer and use it in GitHub Desktop.
Save davidalpert/78d607ddab66f04a1026 to your computer and use it in GitHub Desktop.
lg = log --graph --pretty=tformat:'%Cred%h%Creset -%C(yellow)%d%Creset %s %-n%Cgreen(%ci)%Creset%-n' --date=relative
lg2 = "!git lg -2"
drop = "!sh -c 'git merge drop$1 && git ci --allow-empty --amend && git lg2' -"
patch = "!sh -c 'git merge patch$1 && git ci --allow-empty --amend && git lg2' -"
cd = "!git diff-index --cached --quiet HEAD --ignore-submodules -- && GIT_COMMITTER_DATE=\"$1\" git commit --allow-empty --amend -C HEAD --date \"$1\"" || echo >&2 "error: date change failed: index not clean!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment