Minkowski metric under coordinate change We are given the Minkowski metric $g_{ab}=\textbf{diag}(-1,1,1,1)$ and want to calculate $\tilde g_{ab}$ in the coordinates
\begin{align}
\tilde x^0 &= t-z \\
\tilde x^1 &= r\\
\tilde x^2 &= \phi\\
\tilde x^3 &= z\\
\end{align}
where $(r,\phi)$ are plane polar coordinates in the $(x,y)$ plane. 
Now I thought that this would be rather easy to calculate when we use that
\begin{align}
ds^2 = g_{ij} \, dx^i \, dx^j = -dt^2 + dx^2 + dy^2 + dz ^2.
\end{align}
Calculating this would give me
\begin{align}
t &= \tilde x ^0 + z \rightarrow dt = d\tilde x ^0 + dz\rightarrow dt^2 = (d\tilde x^0) ^2 + dz^2 + 2 d\tilde x^0 dz \\
x&=r \cos (\phi) \rightarrow dx = \cos(\phi) dr  - r\sin(\phi) d\phi \\
y &= r\sin(\phi) \rightarrow dy = \sin(\phi) dr + r \cos(\phi) d\phi \\
z&= \tilde x ^3 \rightarrow dz = d\tilde x^3 
\end{align}
and so
\begin{align}
ds^2 &= - (d\tilde x^0 +dz)^2 + dr^2 + r^2 d\phi ^2 +(dz)^2 =\\
&= -(d\tilde x^0)^2 + dr^2 + r^2 d\phi ^2 - 2 d\tilde x^0 \, dz . 
\end{align}
Can this be true? I don't think so, because I tried verifying that $g(X,X) = \tilde g (\tilde X,\tilde X) $ for some arbitrary vector in the old and the new coordinates and it does not give me the same.
EDIT: I have tried verifying $g(X,X)=\tilde g (\tilde X, \tilde X)$ with the vector $X=(1,1,0,0)^T$. For this $X$, I obviously get $g(X,X)=0$. 
This vector in the new coordinates $\tilde X$ should be
\begin{align}
\tilde X = (1,\frac{1}{\cos\phi},-\frac{\sin\phi}{r},1)^T
\end{align}
if I am not mistaken and therefore $\tilde g(\tilde X,\tilde X) \neq 0$.

You have calculated $ds^2$ correctly:
$$
ds^2 = -(d\tilde{x}^0)^2 - 2 \, d\tilde{x}^0 \, d\tilde{x}^3 + (d\tilde{x}^1)^2 + (\tilde{x}^1)^2 (d\tilde{x}^2)^2 + (d\tilde{x}^3)^2
$$
But you have transformed $X$ incorrectly. 
We have
$$\begin{align}
\tilde{x}^0 &= t - z \\
\tilde{x}^1 &= r = \sqrt{x^2+y^2}, \\
\tilde{x}^2 &= \phi = \arctan(y/x), \\
\tilde{x}^3 &= z,
\end{align}$$
so
$$\begin{align}
d\tilde{x}^0 &= dt - dz, \\
d\tilde{x}^1 &= \frac{x \, dx + y \, dy}{\sqrt{x^2+y^2}} = \cos\phi \, dx + \sin\phi \, dy, \\
d\tilde{x}^2 &= \frac{x \, dy - y \, dx}{x^2+y^2} = \frac{\cos\phi \, dy - \sin\phi \, dx}{r} \\
d\tilde{x}^3 &= dz
\end{align}$$
which gives
$$\begin{align}
\tilde{X}^0 &= 1 - 0 = 1, \\
\tilde{X}^1 &= \cos\phi \cdot 1 + \sin\phi \cdot 0 = \cos\phi, \\
\tilde{X}^2 &= \frac{\cos\phi \cdot 0 - \sin\phi \cdot 1}{r} = -\frac{\sin\phi}{r}, \\
\tilde{X}^3 &= 0.
\end{align}$$
Thus,
$$\tilde{g}(\tilde{X}, \tilde{X}) = -1^2 - 2 \cdot 1 \cdot 0 + (\cos\phi)^2 + r^2 \left(-\frac{\sin\phi}{r}\right)^2 + 0^2 = 0 = g(X, X).$$
