Complex sentence: Gibson and Company M, 3rd Artillery, left Fort Bragg in January 1859 to be replaced by Company D, 6th Infantry, which stayed for two years and continued to build up the post.
Split into simpler sentences: Gibson and Company M, Third Artillery left Fort Bragg in January 1859 to be replaced by Company D, 6th Infantry. They stayed for two years and continued to build up the post.