The German government has reached a deal with carmakers to jointly spend EUR1.2bn (US$1.4bn) on incentives to boost electric car sales.