Skip to content

Instantly share code, notes, and snippets.

@andyscott
Created January 14, 2020 18:09
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 andyscott/185fc132d143cd8ce10487c550c319e9 to your computer and use it in GitHub Desktop.
Save andyscott/185fc132d143cd8ce10487c550c319e9 to your computer and use it in GitHub Desktop.
git tardis
[alias]
tardis = "!f() { \
git --no-pager log --color -g --abbrev-commit --pretty='%C(auto)%h% D %C(blue)%cr%C(reset) %gs (%s)' \
| fzf --ansi \
| cut -d \" \" -f 1 \
| xargs -I {} bash -c \"( git name-rev --no-undefined --name-only {} 2>/dev/null || echo {} )\" \
| xargs git checkout; \
}; f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment