Anas bin Malik reported,

On the day of sacrifice, the Prophet ﷺ said, "Whoever slaughtered before the prayer must repeat his sacrifice."A man stood up and said, "Messenger of Allah, this is a day on which meat is desired." He mentioned his neighbors, then added, "I have a young goat that is better than two sheep of meat."The Prophet ﷺ granted him a concession to use it, but I do not know whether this concession extended to anyone besides him. Then the Prophet ﷺ turned to two rams and slaughtered them, and the people went to a small flock of sheep and divided them among themselves.

Bukhari 5549

Sahih

حدثنا صدقة أخبرنا ابن علية عن أيوب عن ابن سيرين

عن أنس بن مالك قال

قال النبي ﷺ يوم النحر من كان ذبح قبل الصلاة فليعد فقام رجل فقال يا رسول الله إن هذا يوم يشتهى فيه اللحم وذكر جيرانه وعندي جذعة خير من شاتي لحم فرخص له في ذلك فلا أدري بلغت الرخصة من سواه أم لا ثم انكفأ النبي ﷺ إلى كبشين فذبحهما وقام الناس إلى غنيمة فتوزعوها أو قال فتجزعوها

البخاري 5549صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Sacrificial animals
Chapter
What is desired of meat on the day of sacrifice
Numbering
Darussalam 5549
Bukhari 5549