The old law of “forswearing yourself” is referring to swearing an oath invoking the name of God, usually in connection with testimony in court. It also referred to making vows when consecrating certain property to the temple, as in Leviticus 27. Jesus offered three prohibitions: do not swear, even by heaven, by the earth, or by thine head. Thou shalt not forswear thyself is translated thou shalt not bear false witness in Matthew. In the Ten Commandments, it reads, “Thou shalt not take the name of the Lord thy God in vain,” which is defined in the Bible notes as “uttering an oath or makes a promise using the Lord’s name without valid purpose.”
Jesus’ injunction to not “swear by thy head” may sound strange, but a priest under the Law of Moses had to retire when they grew white hairs (3 Nephi 12:36). The mandatory retirement age under the Law of Moses for priests was fifty years old. It was a lot of work to do all the heavy lifting involved with the sacrifices, so they had to be young enough that their hair was still black. If one single white hair appeared, they lost their job as a priest. Perhaps people would swear “by my black hair,” meaning they were perfectly able, as a priest, to invoke the name of God. However, Jesus prohibited that. That is not how we make our oaths and covenants, for “you cannot make one hair black or white.”
Jesus said that our communication should be simply “Yea, yea and nay, nay.” That means if they were going to enter into the covenant being made there, they should just bow their heads and say “yes,” or “no.”