Okay. Starfighter organization in the GFFA. Here we go again.

George liked the sound of certain words, and, in general, went for "feel/implication" over strict accuracy. A lot of his reference was WWII-bomber-based, with some dogfighting. My granddad was in the 510th Bombardment Squadron, 351st Bombardment Group, 8th Air Force. He was formation leader and deputy squadron commander for most of his tour. So I know how real-world stuff worked for
bombers at the time. My own interests were in naval aviation, and I wanted to be a Tomcat driver before the three words "pre-existing", "medical", and "condition" kept me out. I know a lot about how post-WWII naval aviation organization works.
One thing I can appreciate as sort of unintentional worldbuilding is how what George
did gives it verisimilitude-at-a-remove. It's evocative, but not
exactly like how anyone does it out here in Reality-Land™.
He used the words "squad(ron)" and "group" interchangeably in ANH. In ESB, per the deck officer "groups seven and ten will stay behind to fly the speeders" -- of what Luke then identified as Rogue
Group. Two groups making up a group is nonsensical. In ROTJ, all the dialogue refers to the colors in group terms. But ILM shot a
lot of stuff, that George then picked and chose what he wanted where for the best
look. A bunch of actors in flight gear in the cockpits of the various fighters, all delivering the same lines in their own way. So, as a result, Gray Leader is also Red Two, Green Leader is also Red Three... It's kinda garbage and you can't point to it with any kind of consistency. Factors like West End Games and Decipher then muddled things further in the early EU due to their own (mis)interpretations. That's how the B-Wings in ROTJ became Blue Group, when the visual storytelling (and their markings) present them as better fitting Gold Group.
So what I stick with is that there are Groups, each of which containing three Squadrons, each consisting of (typically) twelve craft, organized into four-ship sections, each consisting of two-ship elements -- lead and wing. Granular, all the way up and down. So in ANH, when Luke made his trench run, he was flying point, Biggs was his wing, Wedge was rear cover, and the Y-Wing we saw leaving with Luke and Wedge was flying high cover outside the trench (as
Analyzer and I sorted out over in the modeling section, I feel it's the Red Jammer Y-Wing, flying under the Red 7 callsign).
There's a broadly-established hierarchy of gold-red-blue throughout the setting, from Mandalorian Protector grades to clone trooper ranks to Imperial ranks, and the color-coding of the squadrons seems to fit that. I feel like Republic and Empire just numbered their Groups, and had internal designations within those Groups similar to what we do. The Rebellion is, by necessity, much more flexible. It's likely they went with the G-R-B thing out of that millennia-long familiarity, and their Groups are named, being moved around as needed, so quasi-independent units. The colors indicate rough mission rôle. Gold are the primary assault squadron. Red are the interceptors/dogfighters, providing cover for Gold. Blue are the high cover/picket ships and/or landing forces. The greenest pilots go into Blue, being the posting most likely to get them some combat experience without getting them killed before they can learn anything.
So I don't treat the Rebels' structure as indicative of formal military organization in the GFFA. Meanwhile, over in the Empire, the callsigns say it all: AA-(#)(#)#-(#)#... Where it goes, two-letter code for posting, one-to-three-digit (by the time of ROTJ) Group number, one-or-two-digit craft number (one through twelve). So, for instance, Vader's wingmen in Star Wars were DS-61-2 and DS-61-3. DS because they were part of the
Death Star's starfighter wing (consisting of at least five known Groups), 61 because they were part of the Empire's 61st Starfighter Group, and 2 and 3 for the individual craft within the group. Good chance they were part of the lead squadron, but numbering doesn't necessarily indicate that. Especially in the Empire, personnel got shuffled around the Group to keep cliques or conspiracies from forming. At the time of ROTJ, the 181st Starfighter Group, the Group Commander was in the second squadron, and his deputy was leading the first. 181-1 (Fel) and his wingman, 181-3, were in the one squadron, while 181-2 (Phennir) and
his wingman, 181-4 were in the other.
I feel it's likely the Empire didn't have specific squadrons indicated within the Groups because of this shuffling. Squadron rôles and assignments were likely drawn up for any given mission.
But, in all cases, it's the Group that seems to be the linchpin unit of organization, rather than anything larger or smaller.