The Prophet ﷺ used to go out to the prayer ground with the spear-staff carried in front of him. It would be planted in the ground at the prayer ground before him, and he would pray facing it.
كان النبي ﷺ يغدو إلى المصلى، والعنزة بين يديه تحمل وتنصب بالمصلى بين يديه فيصلي إليها.
Bukhari narrated it in the Book of the Two Eids (973) from Ibrahim bin Munzir, who said, Walid told us, who said, Abu Amr told us, who said, Nafi informed me, from Ibn Umar, and he mentioned it.Ibn Majah narrated it through this same route (1304), adding, "This was because the prayer ground was open space with nothing in it to serve as a screen."Bukhari (494) and Muslim (501) both narrated it through the route of Abdullah bin Numayr, who said, Ubaydullah told us, from Nafi, from Ibn Umar, that the Messenger of Allah ﷺ, whenever he went out on the day of Eid, would order that the spear be brought and set up in front of him, and he would pray facing it while the people stood behind him. He used to do this while traveling as well, and that is why the commanders later adopted the practice. This wording is Bukhari's.In another version found in both of their collections, the spear would be planted in front of him on the day of Fitr and the day of sacrifice, and then he would pray facing it.