A little subtlety on this. If this is general relativity in its usual formulation, this is all true. The covariant derivative then involves a connection which is usually known as the Levi-Civita or Christoffel connection, which has a simple construction based on the metric. This covariant derivative does commute with the metric - in the jargon, it is "metric compatible". However, it is possible to define connections and associated covariant derivatives which are not metric compatible. But it's very unlikely you're dealing with those - if you're looking at GR, the comments above are perfectly correct.