Absalom made Amasa the boss of the army, not Joab. Amasa was in David’s family. He was the son of Abigail. Abigail was sister of Zeruiah, Joab’s mom. ️
Absalom had appointed Amasa over the army in place of Joab. Amasa was the son of a man named Ithra, the Ishmaelite who had married Abigail, the daughter of Nahash and sister of Zeruiah the mother of Joab.
KJV
And Absalom made Amasa captain of the host instead of Joab: which Amasa [was] a man’s son, whose name [was] Ithra an Israelite, that went in to Abigail the daughter of Nahash, sister to Zeruiah Joab’s mother.
ASV
And Absalom set Amasa over the host instead of Joab. Now Amasa was the son of a man, whose name was Ithra the Israelite, that went in to Abigail the daughter of Nahash, sister to Zeruiah, Joab’s mother.