The Hebrew word ‘to swear’ is שבע ‘shava’ which is also related to the Hebrew word for the number 7 שבע ‘sheva’ and has the meaning of completeness or fulfilment. To swear then gives us the idea of doing it seven times for completion and ensures it is guaranteed.
The word appears first in Genesis 20 relating to the treaty made between Abraham and Abimelech. The treaty was made in Beersheba where Abraham gave Abimelech seven ewes so the place-name could therefore mean well of seven, well of the oath or well of the sevenfold oath!
It is also used in Genesis 22:16-18 where we see that God makes an oath. ‘"By myself I have sworn, declares the LORD, because you have done this and have not withheld your son, your only son, I will surely bless you, and I will surely multiply your offspring as the stars of heaven and as the sand that is on the seashore. And your offspring shall possess the gate of his enemies, and in your offspring shall all the
nations of the earth be blessed, because you have obeyed my voice."’
We notice that God swears by Himself and that there is a promise of a Messiah who will be victorious over His enemies and in whom all the nations of the earth will be blessed. God swears a second time in Psalm 110:4 again promising the Messiah ‘The LORD has sworn and will not change his mind, "You are a priest forever after the order of Melchizedek."’
Remember that an oath by God is an absolute, cast iron guarantee.
For Christians these two oaths by God Himself are referred to in Hebrews 6:13-20
‘For when God made a promise to Abraham, since he had no one greater by whom to swear, he swore by himself, saying, "Surely I will bless you and multiply you." And thus Abraham, having patiently waited, obtained the promise. For people swear by something greater than themselves, and in all their disputes an oath is final for confirmation. So when God desired to show more convincingly to the heirs of the promise the unchangeable character of his purpose, he guaranteed it with an oath, so that by two unchangeable things, in which it is impossible for God to lie, we who have fled for refuge might have strong encouragement to hold fast to the hope set before us. We have this as a sure and steadfast anchor of the soul, a hope that enters into the inner place behind the curtain, where Jesus has gone as a forerunner on our behalf, having become a high priest forever after the order of Melchizedek.’
James (the anglicised word for the name Ya’acov or Jacob) also says not to swear.
‘But above all, my brothers, do not swear, either by heaven or by earth or by any other oath, but let your "yes" be yes and your "no" be no, so that you may not fall under condemnation.’ James 5:12