This question came to me while thinking about a few different historical things.
Like, when Germany reunified, much of the East German Military personnel and equipment was let go.
After South Africa ended minority rule, there was big questions on how to integrate different rebel groups with the former South African army.
And, A few military bases are named after Confederate officers, and a unified federal army was to fight in future wars like Spanish American, Banana wars, ww1 etc.
So how did the union go about trying to create a true US military?
Things like base names after former traitors didn't come about until World War I, so not really a reflection of integration in the period. In the aftermath of the war when Confederate veterans were still of military age, there was nothing of that sort, although some did end up back in Blue. I would point to this older answer which looks into the matter in more depth.