The prohibition to create and continue a Machlokes/dispute:
It is forbidden to continue a dispute, and one who does so transgresse’s a Negative command, as the verse states “Do not be like Korach and his people”. This applies even if in truth one’s side is correct and the other side is guilty of wrongdoing, as even Moshe who was correct, went to make peace with Dasan and Aviram. One should distance himself from it like one distances from fire.
Machlokes Lesheim Shamayim-for religious matters: The above prohibition applies even to a Machlokes that is Leshem Shamayim, for religious reasons. A person should even nullify a custom or Chumra to avoid Machlokes. Majority of suffering and tragedies experienced by the Jewish people come as a result of Machlokes Lesheim Shamayim.
The prohibitions transgressed with Machlokes: Aside for the innate prohibition against Machlokes, Machlokes also leads to other prohibition. It leads to hatred, which transgresses the command of “Do not hate your brother in your heart.” It also leads to various other Biblical transgressions, such as revenge, Lashon Hara, anger, physical fighting. The punishments: One who continues a conflict is placed in excommunication. A home that contains Machlokes, hosts the Satan in their home. Such a home will eventually become destroyed. Many good people, endeavors, and communities have been destroyed due to Machlokes.
How to end dispute:
From a letter of the Rebbe: Whenever there are two parties in argument over a matter in this physical world, it is nearly impossible for one party to be completely correct, and the other party to be completely at fault. Every party has at least some wrongdoing that needs amending. In fact, as explained in Chassidus, it is this wrongdoing that may have triggered the wrongdoing of the other, perhaps to even a greater quantity and quality, as the verse states that just as water reflects one’s image so too the heart of man reflects another’s heart. Many good endeavors have become sabotaged due to conflict and discord that is motivated by a desire of imaginative respect, and is at times embellished within claims of fear of heaven and matters of piety [Shpitz Chabad]. Some people, after hearing the above words, rather than make an accounting of their own soul and situation, repenting for their ways and judging the other person favorably to the point he feels humbled before him, they rather demand the above from the other party. They use this to enthusiastically preach to the other party that they should do Teshuvah, and with no less enthusiasm, they judge themselves favorably, with great scrupulousness, and demand of others that they be humble before him.
 Bamidbar 17/5
 Rav and Resih Lakish in Sanhedrin 110a; Smag 157 [Biblical-Possibly listed as Mitzvah 157]; Rambam and Ramban Sefer Hamitzvos Shoresh 8 [Rabbinical]; Marganisa Tava on Sefer Hamitzvos Shoresh 8; M”B 156/4; See Piskeiy Teshuvos 156/13
Is this prohibition Biblical or Rabbinical? Some Poskim learn this prohibition is Biblical, and is counted as one of the 613 commands. [Smag 157; Marganisa Tava on Sefer Hamitzvos Shoresh 8; M”B 156/4 in name of Smag; Mentioned in Likkutei Sichos 18/202 footnote 3; See also Igros Kodesh 14/391 “One is to distance himself from Machlokes, which is Biblically forbidden according to all opinion”; See also Toras Menachem 5743 1/388] Other Poskim rule the verse of “Lo Yiyeh Kekorach Veadaso” is not Biblically coming to teach us against continuing a Machlokes. Rather, this prohibition is merely Rabbinical, and the verse is used as an Asmachta. [Rambam and Ramban Sefer Hamitzvos Shoresh 8] Some Poskim learn the verse of “Lo Yiyeh Kekorach Veadaso” is in truth a Biblical prohibition against arguing against the Kehuna, as did Korach, and not against all Machlokes. [Ramban Sefer Hamitzvos Shoresh Shemini 5] Other Poskim learn the above verse is not a Mitzva at all, and is simply stating that one who argues against the Kehuna will not be punished like Korach was punished. [Rambam Sefer Hamitzvos Shoresh 8; Kinas Sofrim ibid; Megilas Estehr ibid]
 So was done by Moshe, who was certainly correct in his dispute; See Riy Milunil
 See Kav Hayashar 3; Rambam ibid
 Admur Igros Kodesh 32; Noda Beyehuda Kama Y.D. 1 “Today there is no real Machlokes Lesheim Shamayim”; Chasam Sofer Korach
 See Admur 468/11-14; See Igros Kodesh 14/391 regarding Nussach of Davening; 5/91; 16/12 and 99; 19/249 regarding wearing a Tallis as Chazan
 Igros Kodesh Admur
 Sheilasos of Rav Acha 131
 Kav Hayachar 34
 Zohar 1/37
 Derech Eretz Zuta 9
 Rambam in his will to his son
 Igros Kodesh 13/19; 3/20; 11/138