Skip to content

Instantly share code, notes, and snippets.

@cuongtransc
Created December 22, 2017 02:16
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 cuongtransc/7c22a878ed830b8cddf6d6421fd49a9e to your computer and use it in GitHub Desktop.
Save cuongtransc/7c22a878ed830b8cddf6d6421fd49a9e to your computer and use it in GitHub Desktop.
#
# Edit file ~/.gitconfig, add to git alias
#
# Download peco: https://github.com/peco/peco
#
[alias]
logp = "!git log --oneline $@ | peco"
showp = "!git show `git log --oneline | peco | cut -d' ' -f1`"
showpfile = "!git show --name-only `git log --oneline | peco | cut -d' ' -f1`"
resetp = "!git reset `git log --oneline | peco | cut -d' ' -f1`"
reset-reflogp = "!git reset `git reflog | peco | cut -d' ' -f1`"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment