Metadynamics is an established sampling method aimed at reconstructing the free-energy surface relative to a set of appropriately chosen collective variables. In standard metadynamics, the free-energy surface is filled by the addition of Gaussian potentials of preassigned and typically diagonal covariance. Asymptotically the free-energy surface is proportional to the bias deposited. Here, we consider the possibility of using Gaussians whose variance is adjusted on the fly to the local properties of the free-energy surface. We suggest two different prescriptions: one is based on the local diffusivity and the other on the local geometrical properties. We further examine the problem of extracting the free-energy surface when using adaptive Gaussians. We show that the standard relation between the bias and the free energy does not hold. In the limit of narrow Gaussians an explicit correction can be evaluated. In the general case, we propose to use instead a relation between bias and free energy borrowed from umbrella sampling. This relation holds for all kinds of incrementally deposited bias. We illustrate on the case of alanine dipeptide the advantage of using adaptive Gaussians in conjunction with the new free-energy estimator both in terms of accuracy and speed of convergence.