Avoid committing commented code. Write a comment to say something was deleted and point it to the gitref where it was last committed if you need a reminder.