Some say that `git rerere` was invented for this purpose.