The union general granted Lee favorable terms of surrender allowing the men to return to their homes and letting the officers cavalrymen, and artillery men keep their swords and horses if the men agree to lay down their arms and abide by federal law
Hope this helps :3