Sunday, December 8, 2013

Inverting the git index

I wanted to find a way to invert the git index (swap the staged and unstaged files in the index). There were some answers on stackoverflow but the best I found initially required an interactive rebase to reorder the commits.

Then I found another answer about how to use tags to invert commits. This is ultimately what I'm using now by putting both answers together:

No comments:

Post a Comment