The Mishna that begins at the bottom of daf 15a teaches:
One may construct side posts from anything, even a living creature, provided that it was properly attached to the entrance of the alleyway, and Rabbi Meir prohibits using a living creature as a side post. The Mishna continues with a similar dispute: Even a living creature imparts ritual impurity if it is used as the covering of a grave. But Rabbi Meir deems it pure. Likewise, one may write women’s bills of divorce on anything, even a living creature. But Rabbi Yosei HaGelili invalidates a bill of divorce written on a living creature.
The Mishna states that a Lehi (side post) can be made of anything – even a live animal. As an aside, the Mishna continues by discussing the status of an animal that is used as a grave marker, or when a man chooses to divorce his wife by writing the geṭ on a live animal, which works according to the Hakhamim, but does not according to Rabbi Yosei HaGelili.
The Gemara explains that the disagreement between the Hakhamim and Rabbi Yosei HaGelili stems from different ways of understanding the passage in the Torah ( 24:1) that teaches the laws of divorce. According to the Torah, a man who wants to divorce his wife must write a Sefer Keritut (a book of separation) in order to send her out of his house. Rabbi Yosei HaGelili understands that the divorce document must have some of the qualities of a book, including that it cannot be a live animal. The Hakhamim interpret the passage to mean that the divorce must offer total separation. This teaches that if conditions are set down that make the permanence of the divorce questionable, then we do not have a Sefer Keritut, and the divorce is invalid.
This is only true if the conditions of the divorce are such that, even after separation, the wife is still obligated to her husband in some way. If, however, the condition is long-term (e.g. that the divorce is contingent on the woman never again stepping foot in her father’s house) but can be kept, according to many opinions the divorce is valid, but the woman must be careful to fulfill the condition, lest the divorce become invalid retroactively. According to the ruling of the Shulḥan Aruk (Even Ha-Ezer 143:20-21) such a condition should not be made because of the potential danger, should the woman remarry and fail in fulfillment of the condition.