You can do that. You do need to mix the entire gallon at once. It comes in metal cans, one can for each solution (which should also make it last indefinitely.) It's generally not good to mix partial amounts from powders, as the ingredients may not be evenly divided in the powder.
I just put mine into one gallon plastic jugs. It's not very subject to oxidation as developers go, but it's still good to squeeze the air out. What you propose is fine.