With magnetism, the Gibbs Free Energy is $F-HM$, where $F$ is the Helmholtz Free Energy, $H$ is the auxiliary magnetic field, and $M$ is magnetization.
Why is this? Normally, in thermodynamics, we Legendre Transform the various free energies into each other to maximize the global entropy. In these cases, we subtract $TS$ when we are imagining a system exchanging heat with a thermal reservoir (i.e. heat bath at constant temperature $T$), add $PV$ when we exchange volume $V$ with a constant pressure reservoir at pressure $P$, and subtract $\mu N$ when we exchange particles with a chemical reservoir at constant chemical potential $\mu$.
In every other case, we exchange heat, volume, and particles with the reservoir. How do we justify writing $G=F-HM$. Though it is true that $H$ is maintained constant, we don't exchange magnetization with a "magnetic reservoir".