This question contains a misconception: Swords to Plowshares does not redirect damage. It is an instant that exiles a target creature. If you cast it on an attacking commander, that commander is exiled during the spell-resolution step — before the combat damage step even occurs. With the commander gone, no combat damage is dealt at all, and therefore no commander damage is counted.
Commander damage (tracked under the Commander rules, analogous to CR 903.10) requires that the commander actually deal combat damage to a player. If the commander never reaches the damage step — because it was exiled, destroyed, or otherwise removed — there is no damage to count.
There is no mechanic in the base rules that 'redirects' combat damage from a commander to a player in the way the question implies. Effects that do redirect damage (like Deflection or Banding) are separate cards with their own rules, and even those don't interact with commander damage tracking in a way that would transfer the source identity.
Concrete example: Your opponent's Atraxa, Praetors' Voice (a commander) is declared as an attacker against you. You cast Swords to Plowshares targeting Atraxa. It resolves, exiling Atraxa. The combat damage step arrives with no Atraxa on the battlefield — no damage is dealt, and your commander damage total from Atraxa remains unchanged.
In short, Swords to Plowshares simply removes the threat; it does not interact with commander damage tracking in any indirect way. (Relevant rules: CR 509.1 for combat damage step, CR 608.2 for spell resolution, CR 903.10 for commander damage.)
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.