Created
January 5, 2015 01:41
-
-
Save matthiassb/fe3d9b745afface75fba to your computer and use it in GitHub Desktop.
Reset git
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log | perl -n -e '/commit (.*)/ && print "$1\n"' | awk "NR==`git status | grep -Po "(\d) commit" | tr -d [a-z] | xargs -n 1 expr 1 +`" | xargs -n 1 git reset --soft |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment