I have got changes in my staging area, and others not staged yet (some files have changes both in and out the staging area). I would like to invert the content of the st
Based on gtd's answer and the ability to script inverting the commits this is what I'm using now:
[alias]
swaplast = !git tag _invert && git reset --hard HEAD~2 && git cherry-pick _invert _invert~1 && git tag -d _invert
invertindex = !git commit -m tmp1 && git add -A && git commit -m tmp2 && git swaplast && git reset HEAD~1 && git reset HEAD~1 --soft
Posted on my blog here: http://blog.ericwoodruff.me/2013/12/inverting-git-index.html