The procedure for automatically converting them using Git filters is from Kelvin Sherlock, with some adjustments.