Total derivatives in GR Without gravity we can easily switch between terms in a Lagrangian, such as $\partial\phi\partial\bar{\phi}$ and $\phi\Box\bar{\phi}$, since total derivative vanishes. But in GR we have additional $e\equiv\sqrt{-g}$ factor, for which ordinary derivative does not vanish $\partial e\neq 0$. Is it correct that in this case we will introduce additional term $\phi\partial\bar{\phi}\partial e$, when switching between $\partial\phi\partial\bar{\phi}$ and $\phi\Box\bar{\phi}$? And which of these two goes into the Lagrangian?
 A: The covariant divergence of a vector is
$$\nabla_\mu V^\mu = \frac{\partial_\mu (V^\mu \sqrt{-g})}{\sqrt{-g}}$$
Meaning that adding a covariant divergence to the Lagrangian will result in the following change : 
$$\Delta S = \int d^4x \sqrt{-g} \nabla_\mu V^\mu = \int d^4x \partial_\mu (V^\mu \sqrt{-g})$$
which is once again easy to see that it vanishes using integration by part. As with most other things in general relativity, the substitution $\partial \rightarrow \nabla$ makes this still work fine.
A: OP is observing that in Minkowski space $g_{\mu\nu}=\eta_{\mu\nu}$, it doesn't matter whether we write $${\cal L} ~=~\sqrt{|g|}\partial\phi\partial\bar{\phi} \tag{1} $$ or $${\cal L}~=~-\sqrt{|g|}\phi\Box\bar{\phi}\tag{2} $$ for the Lagrangian density, if we don't care about total divergence terms. OP is pondering what happens in curved spacetime $(M,g)$? Actually both eqs. (1) and (2) still apply if we interpret the box $\Box$ as the Laplace-Beltrami operator of $(M,g)$. Of course, any other interpretation would not be geometrically sound.
