As a retired US History teacher, let me give you the short version.
Lincoln of course was a Republican, and the party was founded partly as an anti-slavery party. The South was known as the "Solid South" back then, usually 100% Democratic so at this time, the Reps were in favor of abolition, and the Dems weren't. During Reconstruction, a Rep. Congress proposed the 13th-15th Amendments, which freed the slaves, gave them citizenship, and the right to vote. Most of the "Freedmen" voted Rep. Let's move to the 20th century.
FDR needed southern votes in Congress to pass the New Deal, so he was mostly "hands off". He did do things like name M.M. Bethune as an adviser on education and other things, like extending the New Deal to minorities etc. This is when most blacks joined the Dems. Truman, also a Dem, started the first permanent council on Civil Rights and integrated the armed forces. Brown Vs. The Board was backed up by Ike, a Rep when he called up the 101st to enforce a ruling by a Federal judge and to ensure the safety of 9 black students attending Little Rock HS. The most famous acts, the Civil Rights acts of 64, 65, and 68 were passed while LBJ, a Dem. was POTUS. I'm not going to debate the merits of this, I'm only trying to help out a fellow poster. Please excuse any typos as it's late.
HTH,
GBinSC