One way to repair a hole in drywall without enlarging it to the adjoining joists is by using what is known as a “hot patch.”
To make a hot patch, cut a piece of drywall several inches larger than the hole on all sides. Then remove the excess wallboard from the patch while leaving just the paper intact.
Spread a thin layer of joint compound on the surface of the drywall surrounding the hole. Then butter the edges of the hole.
Insert the patch in the hole, and use a drywall or putty knife to press the paper firmly into the wet joint compound.
Once the patch has dried, feather out the edges with more joint compound, allow it to dry, and sand the patch smooth.