Skip to content

Instantly share code, notes, and snippets.

@matthiassb
Created January 5, 2015 01:41
Show Gist options
  • Select an option

  • Save matthiassb/fe3d9b745afface75fba to your computer and use it in GitHub Desktop.

Select an option

Save matthiassb/fe3d9b745afface75fba to your computer and use it in GitHub Desktop.

Revisions

  1. matthiassb created this gist Jan 5, 2015.
    1 change: 1 addition & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    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