Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- checkout_recent() {
- LASTN=${1:-5}
- git checkout $(git reflog | egrep -io 'moving from ([^[:space:]]+)' | awk '{ print $3 }' | awk ' !x[$0]++' | egrep -v '^[a-f0-9]{40}$' | head -n $LASTN | fzf)
- }
- alias gre="checkout_recent"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement