Notes on the Bible, by Albert Barnes, [1834], at sacred-texts.com
Compare Sa2 5:11-25, the only important variations from which are in Ch1 14:4-7, the list of the sons of David (see Ch1 3:1 note), and in Ch1 14:12, where the fact is added that the idols taken from the Philistines were burned.
When they had left their gods there - The practice of carrying images of the gods to battle was common among the nations of antiquity, and arose from the belief that there was virtue in the images themselves, and that military success would be obtained by means of them.