The Rambam, of blessed memory, wrote in chapter 5 of Nizkei Mamon: Yehoshua and his beit din stipulated ten conditions at the time he divided the land, and these are they: First, he stipulated that one may graze small livestock in forests where the trees are thick, but one may not graze large livestock there; and in a forest where the trees are thin, one may graze neither large nor small livestock except with the owner's consent. [2] And he likewise stipulated that every person is permitted to gather wood from the field of his fellow, provided they are inferior woods that are close to being thorns, such as <i>hizme</i> and <i>hige</i>, and provided they are moist and attached, and as long as he does not uproot them; but other woods are forbidden. [3] And he likewise stipulated that every person is permitted to gather herbs that grow on their own in any place, except for a field of fenugreek that was sown for livestock. [4] And he likewise stipulated that a person may cut a shoot in any place, except for the stumps of an olive tree; and he may only cut from the trees "like an olive, like an egg" [Rashi explained in Bava Kamma 81a: he shall leave the height of an egg from below, close to the ground; and the Ramah explained: like an egg from the base of the branch, but from the body of the tree he shall not cut at all (Tur)]; and in reeds and vines, from the knot and above [Rashi explained: from the lower knot it is permitted to cut; and the Ramah explained: from the base of the branch]; and in other trees, from the inside of the tree and not from its tip. And when he permitted cutting, he only permitted it from a new growth that does not produce fruit, but not from an old growth that produces fruit; and he may only cut from a place that does not see the face of the sun. And the Tur wrote that in other trees, he shall only cut from the thin branches, and from a place where there are many branches, and from a new tree that does not produce fruit, but not from branches that have already hardened, nor from the middle trunk at the top of the tree in its center, nor from an old tree that has already produced fruit. Thus far his words.
כתב הרמב"ם ז"ל בפ"ה מנזקי ממון עשרה תנאים התנה יהושע ובית דינו בשעה שחלק את הארץ ואלו הן האחת התנה שמרעין בהמה דקה ביערים שאילניהן גסין אבל אין מרעין שם בהמה גסה וביער שאילנות דקין אין מרעין בו לא גסה ולא דקה אלא מדעת בעליו [ב] וכן התנה שיהיה כל אדם מותר ללקט עצים משדה חבירו והוא שיהיו עצים פחותים וקרובים להיות קוצים כגון היזמי והיגי והוא שיהיו לחים ומחוברים ובלבד שלא ישרש אבל שאר עצים אסור [ג] וכן התנה שיהיה כל אדם מותר ללקט עשבים העולין מאליהן בכל מקום חוץ משדה תילתן שזרעה לבהמה [ד] וכן התנה שיהיה אדם קוטם נטיעה בכל מקום חוץ מגרופיות של זית ואינו קוטם מן האילנות אלא כזית כביצה [פירש"י ב"ק פא.] יניח כגובה ביצה מלמטה סמוך לקרקע והרמ"ה פי' כביצה מעיקר הענף אבל מגוף האילן לא יקטום כלל [טור] ובקנים ובגפנים מן הפקק ולמעלה [פירש"י מקשר התחתון מותר לקטום והרמ"ה פי' מעיקר הענף] ובשאר האילן מתוכו של אילן ולא מחודו וכשהתיר לקטום לא התיר אלא מחדש שאינו עושה פירות אבל לא מישן שעושה פירות ואינו קוטם אלא ממקום שאינו רואה פני חמה והטור כתב שבשאר אילנות לא יקטום אלא מן הענפים הדקים וממקום שיש שם הרבה ענפים ומאילן חדש שאינו עושה פירות אבל לא מענפים שנתקשו כבר ולא מגזע האמצעי שבראש האילן באמצעיתו ולא מאילן ישן שכבר עשה פרי עכ"ל: