On page 49 in Hartshornes "Deformation Theory", in the proof of theorem 6.4 he states that the following exact sequence $0\to J\otimes O_{X}\to O_{X_{1}} \to O_{X}\to 0$ gives rise to an exact sequence of abelian groups $0\to J\otimes O_{X}\to O^*_{X_{1}} \to O^*_{X}\to 0$, so that the left group is just the additive group and the groups in the middle and on the right are the corresponding groups of units. I would like to know why is there this exact sequence, as well as when in general you can do something like this.
Setting: $X$ is a scheme flat over a local artin ring $C$. $C'$ is another local artin ring that surjects to $C$ with kernel $J$ (that has square 0). $X_{1}$ is an extension of $X$ over $C'$, that is: there is a closed imbedding $X\to X_{1}$ where $X_{1}$ is flat over $C'$ and it holds that $X=X'\times_{C'} C$.
Let me do this for rings, other case being similar. Let $A$ be any ring (commutative with identity) and $J\subset A$ an ideal with $J^2=0$. Then, I claim that there is an exact sequence $0\to J\to A^*\to (A/J)^*\to 0$ of abelian groups. The only observation is that if $j\in J$, $1+j$ is a unit in $A$, since $(1+j)(1-j)=1$.
The right side map is obvious and the left side map is $j\mapsto 1+j$. Since $1+(j+k)=(1+j)(1+k)$, we see that this indeed a map of abelian groups. Surjectivity on the right is clear, since any lift of a unit in $A/J$ is a unit in $A$. Exactness is clear too, since if $a\mapsto 1\in (A/J)^*$, this means $a=1+j$ with $j\in J$.