So, previous to chapter 20, the men of Judah were arguing with the men of Israel about who owned David more, having recently all just abandoned him to Absalom's treachery.
Dear Lord! Now, in the midst of this, one "worthless fellow", named Sheba, a Benjaminite, decides to stir it up even further. He blows a trumpet and encourages everyone to go got to their tents to regroup an take on David-with no one having any inheritance in him.
Benjamin was the tribe of Saul, so I think they are the least supportive of David as king, in general.
Having said that, THEY ALL LEAVE! Except Judah who stays with him from the Jordan to Jerusalem.
I was shocked at this turn of events; that they were turn from their king so soon after having been reconciled; but then I remembered how fickle I am and have been. Jealous for my king, coming running back to God; just to have someone sound a trumpet and off I go chasing an idol. I'm so ashamed at our unfaithful hearts and how very very very patient God is with us.
So his first action back home was to dump his 10 raped concubines under guard and leave them there until they died. They were considered "widows" because Absalom raped them. He provided "sustenance"; which seems like the bare minimum considering he left them behind-knowing they would probably be violated. I do not like how rape victims are treated in many cultures. I don't understand.
Next, David gave Amasa (his new general and Joab's nephew) an assignment to collect the men of Judah in three days. Amasa did the assignment, but not on David's timeline. Since Amasa delayed, David send men, including his body guard and the mighty men that had fled with him, after Sheba. He did under the command of his second commander, Abishai.
Amasa finally caught up with them and Joab used the occasion to cut Amasa open with his sword and leave him for dead and head out after Sheba.
One of Joab's men announce that, if you're for David, follow Joab. Amasa's men were all stopping to look at him on the ground, so they drug him out of sight and throw a garment over him. Then everyone moved on to follow Joab.
They chased Sheba to the walled city of Abel. There they built a mound to get over the wall and were bringing much destruction. A wise woman sought to negotiate with Joab. She pointed out that Abel was a mother city of the nation and the people were known for great wisdom. She wanted to know why they were under siege. Joab explained what Sheba had done and they agreed to throw Sheba's head over the wall.
The rest of the chapter is list of roles various people played in David's government. Joab was back over the whole army.