The Einstein-Hilbert Action:
$$S_{EH}=\frac{1}{2\kappa}\int \sqrt{-g}g^{ab} \left({\Gamma^c}_{ab,c} - {\Gamma^c}_{ac,b} + {\Gamma^d}_{ab}{\Gamma^c}_{cd} - {\Gamma^d}_{ac}{\Gamma^c}_{bd}\right) d^4x$$
Contains second derivatives of $g$ as the Christoffel symbols contain derivatives of $g$ but using integration by parts it can be brought into a form with only first derivatives of the metric tensor:
$$S_{EH'}=\frac{1}{2\kappa}\int \left( -{\Gamma^c}_{ab}\partial_c(\sqrt{-g}g^{ab}) + {\Gamma^c}_{ac}\partial_b(\sqrt{-g}g^{ab}) + \sqrt{-g}g^{ab}\left({\Gamma^d}_{ab}{\Gamma^c}_{cd} - {\Gamma^d}_{ac}{\Gamma^c}_{bd}\right) \right)d^4x.$$
Is this equivalent? I sometimes read about 'surface terms' but not sure what this means.
When you work it out it is:
$$S_{EH'}=\frac{1}{8\kappa}\int \sqrt{-g}\left( g^{ab}g^{de}g^{cf} +2 g^{ac}g^{bf}g^{de} +3 g^{ad}g^{be}g^{cf} -6 g^{ad}g^{bf}g^{ce} \right)\partial_c g_{ab}\partial_f g_{de} dx^4$$ (Although I might have got some of the constants wrong). I like this form because it is smilar to the Maxwell Action: $$S_M = \frac{1}{2}\int\sqrt{-g}(g^{ac}g^{bd}-g^{ad}g^{bc})\partial_a A_b \partial_c A_d dx^4$$