Let $M$ be a smooth manifold with a given volume form $\mu$ on it.
Let $\mathbf v_t$ be the time-dependent vector-field on $M$ describing the fluid velocity, and $\rho_t$ the time-dependent function on $M$ describing the fluid density.
The continuity equation $\partial_t\rho_t+\text{div}(\rho_t\mathbf v_t)$ states the invariance of the volume form $\rho_t\mu$ under $\text{Fl}^{\mathbf v}_{t,s},$ the time-dependent flow of $\mathbf{v},$ i.e., explicitly $\frac{d}{dt}(\text{Fl}^{\mathbf v}_{t,t_0})^\ast(\rho_t\mu)=0.\tag{*}$
This interpretation of the continuity equation is based on:
- Lie derivative theorem, i.e. $\frac{d}{dt}(\text{Fl}^{\mathbf v}_{t,t_0})^\ast T_t|_p=\left.\left[(\text{Fl}^{\mathbf v}_{t,t_0})^\ast\left(\mathcal{L}_{\mathbf v_t}T_t+\partial_t T_t\right)\right]\right|_p,$ where $T_t$ is an arbitrary time-dependent tensor-field on $M.$
- the definition of divergence of a vector-field w.r.t. the volume form $\mu,$ by which $\mathcal{L}_{\mathbf v_t}(\rho_t\mu)=d(\mathbf v_t\rfloor\rho_t\mu)=\text{div}(\rho_t\mathbf v_t)\mu.$
Infact, putting 1. and 2. into (*), we get $(\text{Fl}^{\mathbf v}_{t,t_0})^\ast\left[\left(\text{div}(\rho_t\mathbf v_t)+\partial_t \rho_t\right)\mu\right]=0,$ i.e. $\text{div}(\rho_t\mathbf v_t)+\partial_t \rho_t=0.$
Edit Note that the (*) can be rewritten in integral form as the law of conservation of mass: $\tag{**}\frac{d}{dt}\int_{\text{Fl}_{t,t_0}^{\mathbf v}D}\rho_t\mu=0,\text{ for all compact }D\subseteq M.$