General Motors will join rival carmaker Ford in partnering with Tesla for the charging of electric vehicles, the company announced Thursday.