Exercise $19.1.C.$ in Ravi Vakil's notes reads as follows, with the bold part indicating the part I'm having trouble with:
Suppose $\pi: X \rightarrow Y$ is a finite morphism whose degree at every point of Y is $0$ or $1$. Show that $\pi$ is injective on points (easy). If $p \in X$ is any point, show that $\pi$ induces an isomorphism of residue fields $\kappa(\pi(p))\rightarrow \kappa(p)$. Show that $\pi$ induces an injection of tangent spaces.
Where here the degree of $\pi$ at $y$ means that dimension of the global sections of $\pi^{-1}(y)$ as a $\kappa(y)$ vector space.
I can show that $\pi$ is injective on points, since the fibre over a point is a finite scheme over $\operatorname{Spec}$ of the residue field there and thus a finite, discrete set of points. Thus by the degree hypothesis, it is either empty or a single point with the same residue field, which is enough to prove injecttivity on points and that the residue fields of $p$ and $\pi(p)$ are isomorphic. I can't work out how to prove the injectivity on tangent spaces though.
I know it's equivalent to surjectivity on the level of cotangent spaces, which is the same as asking for the image of $\mathfrak{m}_{\pi(p)}$ in $\mathfrak{m}_{p}/\mathfrak{m}_p^2$ to be the whole thing. I've tried playing around with Nakayama's lemma and using that $\mathfrak{m}_{\pi(p)}$ and $\mathfrak{m}_{p}/\mathfrak{m}_p^2$ are both $\mathcal{O}_{Y,\pi(p)}$ modules to try to show that $\pi^{\sharp}(\mathfrak{m}_{\pi(p)})+\mathfrak{m}_p^2 = \mathfrak{m}_p$, but haven't had any luck so far and have run out of ideas.