The Shulchan Aruch · Orach Chayim
אורח חיים תקצ״זOrach Chayim 597
Siman 597 of 697 in Orach Chayim — 3 se'ifim
הלכות ראש השנהLaws of Rosh Hashanah· siman 597
Se’if 1א׳
אוֹכְלִים וְשׁוֹתִים וּשְׂמֵחִים, וְאֵין מִתְעַנִּין בְּרֹאשׁ הַשָּׁנָה וְלֹא בְּשַׁבַּת שׁוּבָה; אָמְנָם לֹא יֹאכְלוּ כָּל שָׂבְעָם, לְמַעַן לֹא יָקֵלּוּ רֹאשָׁם וְתִהְיֶה יִרְאַת ה' עַל פְּנֵיהֶם.
If it is permitted to fast on Rosh HaShana. 3 paragraphs. One eats, drinks and is merry [on Rosh Hashanah.] We do not fast, whether on Rosh Hashanah, nor on Shabbos Shuva (the Shabbos of Repentance which is between R'H and Yom Kippur). However, people should not eat to complete satiation, so that they do not reach light-headedness, and that the fear of God should remain on them.
Se’if 2ב׳
יֵשׁ מְקוֹמוֹת שֶׁקַּבָּלָה בְּיָדָם שֶׁכָּל מִי שֶׁרָגִיל לְהִתְעַנּוֹת בְּרֹאשׁ הַשָּׁנָה וּמְשַׁנֶּה רְגִילָתוֹ וְאֵינוֹ מִתְעַנֶּה, אֵינוֹ מַשְׁלִים שְׁנָתוֹ. הַגָּה: וּמִי שֶׁאֵינוֹ יָרֵא לְנַפְשׁוֹ אֵין צָרִיךְ לְהִתְעַנּוֹת כָּל יָמָיו (כָּל בּוֹ וּמִנְהָגִים), רַק צָרִיךְ הַתָּרָה, כְּמוֹ שְׁאָר נֶדֶר (כָּל בּוֹ).
There are places that have an accepted tradition that all whose routine is to fast on Rosh HaShana, and change their routine, and do not fast. They do not complete their year. Rema: One who does not fear for his soul, it is not necessary to fast all his days [Kol Bo and Minhagim] only he needs to get a Halachic cancellation like with other vows [Kol Bo].
Se’if 3ג׳
הַמִּתְעַנֶּה פַּעַם אַחַת בְּרֹאשׁ הַשָּׁנָה תַּעֲנִית חֲלוֹם; אִם הָיָה בְּיוֹם רִאשׁוֹן, צָרִיךְ לְהִתְעַנּוֹת שְׁנֵי הַיָּמִים כָּל יָמָיו; וְאִם הָיָה בְּיוֹם שֵׁנִי, יִתְעַנֶּה כָּל יָמָיו יוֹם שֵׁנִי בִּלְבַד. הַגָּה: וְאֵין צָרִיךְ לְמֵיתַב תַּעֲנִית לְתַעֲנִיתוֹ, דְּהָא יֵשׁ אוֹמְרִים דְּמִצְוָה לְהִתְעַנּוֹת בְּרֹאשׁ הַשָּׁנָה (תְּרוּמַת הַדֶּשֶׁן סִימָן רע"ח). וְאֵין אוֹמְרִים עֲנֵנוּ בְּרֹאשׁ הַשָּׁנָה, כְּמוֹ שֶׁאֵין אוֹמְרִים בְּיוֹם הַכִּפּוּרִים. (הַגָּהוֹת מִנְהָגִים).
One who fasts once on Rosh HaShana a Fast of Dreams (Taanis Cholom, a fast due to a certain type of dream the night before). If it is the first day (of R'H) he needs to fast the two days his whole life. If it is on the 2nd day, he fast his whole life the 2nd day alone. Rema: It is not necessary to duplicate his fast for his fast because there are those that say it is mitzvah to fast on Rosh HaShana (Terumas HaDeshen Siman 245). And he does not say the Aneinu prayer (said on other fast days) on Rosh HaShana just like we do not say on Yom Kippur (despite fasting) (Haagos Minhagim).
Shulchan Aruch, Orach Chayim — Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Community Translation — CC0