It does not really matter except if you have commutation pulses, aka hall effect.
Then in that case the right sequence has to be wired in the same order as each.
If you don't have a D.B. 'scope, then often the only way is to try the 8 permutations.
Al.