Шмот 32:31 Галаха: Mishneh Torah, Repentance, Sefer Chasidim, Sefer HaChinukh & Shulchan Arukh, Orach Chayim

וַיָּ֧שָׁב מֹשֶׁ֛ה אֶל־יְהוָ֖ה וַיֹּאמַ֑ר אָ֣נָּ֗א חָטָ֞א הָעָ֤ם הַזֶּה֙ חֲטָאָ֣ה גְדֹלָ֔ה וַיַּֽעֲשׂ֥וּ לָהֶ֖ם אֱלֹהֵ֥י זָהָֽב׃

И возвратился Моисей к Господу и сказал: 'О, эти люди согрешили великий грех и сделали их богом золота.

Mishneh Torah, Repentance

He who confesses by speech but has not his heart's consent to abandon his erstwhile conduct, behold him, he is like one taking an immersion of purification and in his grasp is an impure creeping thing, when he knows the immersion to be of no value till he cast away the impure creeping thing. Even so it is advised to do, saying: "But whoso confesseth and forsaketh them shall shall obtain mercy" (Pro. 28. 13). In confessing to God, it is obligatory to name the sin, even as it is said: "Oh, this people have sinned a great sin, and have made them a god of gold" (Ex. 32.31).3Ta’anit, 16a; Yoma, 86b. C.

Mishneh Torah, Repentance

Among the ways of repentance are, for the penitent to continue to cry out in tearful supplication before the Name, to bestow alms according to his means, and to distance himself exceedingly from the thing wherein he sinned, to have his identity changed, as if saying: "I am now another person, and not that person who perpetrated those misdeeds", to completely change his conduct for the good and straight path, and to exile himself from his place of residence, for exile atones iniquity, because it leads him to submissiveness and to be meek and humble-spirited.4Rosh-ha-Shanah, 16b. C.

Sefer Chasidim

Repentance needs four things;1Saadiah Gaon, The Book of Beliefs and Opinions, trans. Samuel Rosenblatt (4th printing; New Haven, Conn: Yale University Press, 1958), Treatise V, Cahpter V, p. 220. first that he repent for each and every sin, transgression and offense. Secondly, that he forsake them. Thirdly, that he confess them in his heart. Fourthly, that he take upon himself with a whole heart, and resolve in his heart that he will not return to do them (sins) again, lest he appear as one undergoing purification with an unclean creature in his hand.2Taanith 16a. For repentance is of no avail to him until he casts the creature from his hand. Also he needs to single out the sin, as it is written, “O, this people have sinned a great sin and have made them a god of gold” (Exod. 32:31). And so should he confess, “I pray Thee, O God, I have sinned, I have done perversely, I have transgressed before Thee, I have done such and such, I am sorry I am ashamed of my deeds. And I give witness concerning myself, He who knows all hidden secrets, that I am resolved in my heart not to return to do this again.”3Pesikta d’Rav Kahana, ed. Solomon Buber (Wilna: Romm Publisher, 1925), p. 294. And so it is written, “Turn Thou me God unto Thee and we will return for Thou are the Lord my God. Surely after that I was turned, I repented, and after that I was instructed, I smote upon my thigh; I was ashamed, yea, even confounded because I did bear the reproach of my youth” (Jer. 31:17).