"And when We took your covenant: You shall not shed your own blood, nor will you evict one another from your homes," meaning: let not some of you evict others. "Then you affirmed, while you were witnessing."
Muhammad said: "Then you affirmed," meaning: you acknowledged the validity of what was taken upon you in the covenant, and what was taken upon your predecessors, "while you were witnessing" that this is the truth.