Go back to the correct tree from the commit list