What was used in this proof that there can not be a holomorphic square root defined on an annulus? Given an annulus around $0$ with the radii $a$ and $b$, can there be a holomorphic square root of $z$? 
The proof given is : No, because assuming it existed
$$ g(z)^2 = z $$ it would follow that : $$ 2g(z)g'(z)=1$$ and then
$$\int _ \gamma \frac{g'(z)}{g(z)} \, dz = \int_\gamma \frac{1}{2z}dz = \pi i$$
contradiction. So there cant be a holomorphic square root of $z$ in that annulus.
How does one get to the third step from the second step? And why is it a contradiction? 
 A: The main idea that there cannot be a holomorphic square root around the origin is precisely because the origin is a branch point of the square root function. As you traverse around the origin, the square root necessarily becomes discontinuous along some branch cut. From Cauchy's Integral Formula, it follows that if $\gamma: [0,\ 1]\rightarrow\mathbb{C}$ is a simple closed curve around the origin that
$$\int_\gamma \frac{1}{z}\ dz = 2\pi i$$
and this typically defines something called the winding number of the curve $\gamma$ around the origin. More precisely, the above integral calculates the total angle of traversal as measured from the origin. It follows that if we take $\gamma$ to be a circle around the origin, traversed once, that the angle traversed is necessarily $2\pi$. One complete circle. Likewise, we can generalize this concept into other functions. If we consider the image of the curve $\gamma$ under the function $g$, then the angle of the curve $g(\gamma)$ is given by
$$\int_{g(\gamma)}\frac{1}{z}\ dz = \int_0^1\frac{g'(\gamma)\cdot\gamma'}{g(\gamma)}\ dt = \int_\gamma \frac{g'(z)}{g(z)}\ dz$$
But if $\gamma$ is a closed curve, then so is $g(\gamma)$. It follows that the angle traversed by $g(\gamma)$ must be an integral multiple of $2\pi$. But the above shows that the curve only completes a half-circle from which we obtain our contradiction. More generally, you may find the argument principle helpful here.
A: Suppose $g$ is a holomorphic function and $\gamma$ is a closed curve.  Pick a point $z_0$ through which $\gamma$ passes.  As you go all the way around the curve $\gamma$, the value of $g(z)$ starts at $g(z_0)$ and returns to $g(z_0)$.  In other words $g(\gamma)$ is a closed curve.  Since it's a closed curve the integral $\displaystyle\int_\gamma \frac{g'(z)}{g(z)}\,dz = \int_{g(\gamma)} \frac{dg}{g}$ should be an integer times $2\pi$.  But you get something else.
If you take any reasonable branch of the two-valued square-root function, and $\gamma$ winds once around $0$, you'll find that $\sqrt{\gamma}$ only goes half-way around, and isn't a closed curve at all, so its integral doesn't have to be an integer multiple of $2\pi$.  But if there's actually a holomorphic square root function, as opposed to a holomorphic branch of a double-valued square root "function", then by the reasoning in the first paragraph above, we'd have to return to our starting point on the curve $g(\gamma)$.
