I didn't realize that. I had always assumed that Lincoln was a Republican during his political career, but he was a Whig as a Congressman in the late 1840s (another fact I didn't realize... Lincoln was out of federal public office for more than 10 years before he became President. I had always assumed he went from the House directly to the Presidency).
He became a Republican in the 1850s, and a National Unionist during his reelection in 1864.