Also if I don't get into a military residency and do get in a civilian one can I do that one
I'm having a hard time sorting through what you're actually asking. Sentences, paragraphs, punctuation, etc.
To answer what I think you're asking here though, the military match is held in Nov and results are released in Dec. There are some differences between Army Navy and Air Force as far as continuous contracts, PGY1-only, and civilian deferral availability.
You can request a full civilian deferral when you're a MS4 but there is no guarantee you'll get one; in fact, most who request one don't get one. If you are not selected for a military PGY1 year you will have to find a civilian PGY1 position in the civilian match.
Since you won't know if you have a military PGY1 spot until December, you'll need to go through the motions for the civilian match from the beginning anyway - you'll be in a world of hurt if you START looking for a civilian PGY1 position in December.
If you do a civilian PGY1 year, you will have to apply for a military PGY2+ program - you may request a civilian deferral. Again, no guarantee you get one, and if you don't get a military PGY2+ position either, you'll do time as a GMO. (And in the Navy, it's very common to do GMO time.)
If you do a military PGY1 year, you may or may not have to apply for the followup PGY2+ position. Army/AF have mostly categorical contracts; Navy makes everyone apply, though some fields are a lot more likely to go directly to PGY2. Few civilian deferrals are given out at this point. Many people spend 2-3 years as GMOs before getting to start PGY2.
Strength of your application and board scores does not necessarily work in your favor when requesting a deferral. The military wants to fill its own programs first, and the people on the selection boards want the best applicants in their own programs. There is little incentive to let a strong candidate go to a civilian program, unless the field is flush with strong candidates.