The Messenger of Allah ﷺ ruled that the right of pre-emption applies to every undivided shared property, whether a dwelling or a garden. It is not lawful for a partner to sell his share until he informs his co-partner, who may then take it if he wishes or leave it if he wishes. If the partner sells without informing him, the co-partner has the greater right to it.
حدثنا أبو بكر بن أبي شيبة ومحمد بن عبد الله بن نمير وإسحق بن إبراهيم واللفظ لابن نمير قال إسحق أخبرنا وقال الآخران حدثنا عبد الله بن إدريس حدثنا ابن جريج عن أبي الزبير
قضى رسول الله ﷺ بالشفعة في كل شركة لم تقسم ربعة أو حائط لا يحل له أن يبيع حتى يؤذن شريكه فإن شاء أخذ وإن شاء ترك فإذا باع ولم يؤذنه فهو أحق به