Connect negative terminal of a battery to Earth I have a question about what happens
in following experiment: Assume we have
a battery with two Galvanic half cell,
eg a magnesium and a copper cell.
Since copper has higher electrode potential
that magnesium, the electrode with
magnesium oxidizes and therefore becomes
the negative terminal und the electrode
with copper reduces and becomes
positive terminal.
I want to find out what happens at the
moment when we connect the earth?
(the earth is here considered as
electrostatically neutral uncharged source
with constant potential, which can
absorb und donate a huge amount of
electrons without changing it's potential) See also this image:

Question: What happens at the moment we
connect the negative terminal
(magnesium) having excess of electrons with
earth und leave simultaneously the positive terminal
unconnected?
Clearly, since the positive terminal is
unconnected, there cannot be a steady
current because there is no closed circuit between positive and negative terminals.
But I'm primary interested in electrostatic effects and want to know
if there happens a electrostatic
discharge at the contact moment within a very very short moment sending the
excess electrons from negative terminal
to earth or does there really literally
'nothing' happen?
Some ideas: Why I conjecture that such elecrostatic discharge should happen: At the moment when we connect
the earth to the magnesium electrode seemingly the unconnected copper electrode isn't noticed by the system earth-magnesium electrode since we assumed that there is no connection to the copper electrode:

And since the earth is neatrally charged and the magnesium electrode contains a lot of electrons on it, it seems reasonable that all this electrons 'want' to run into the neutral earth at the moment we connect the earth to the magnesium electrode. Does it sound reasonable.
That seems to be quite similar to the question what happens immediately after we connect the positive to negative terminals of two Galvanic half cells but remove the salt bridge:

Again, clearly without salt bridge there can no consistent current happen because the salt bridge closes the circuit as ion conductor.
But nevertheless, at the moment we connect the two terminals/electrods whith a wire, shouldn't the excessed electrons at magnesium electrode not nevertheless flow to copper electode and then stay there to compensate the charge/potential difference? And only then because due to lack of salt bridge everything stops?
Are my reasonings correct or if not what is my error? (I asked the same question in physicsstack
 A: I don't have a firm grasp on the chemistry, but the reaction is limited by the voltage difference between the two electrodes. The action of the cell will tend to keep that difference constant. So, if there's a transient flow of electrons from the negative terminal to ground that raises the voltage of that terminal with respect to ground by some amount,* then I would expect an equivalent amount of positive charge (i.e., half as many "+2" ions) to flow across the salt bridge, and raise the voltage of the positive terminal by the same amount.

* That is, assuming that the initial voltage of the negative terminal W.R.T. ground was less than zero. Making the electrical connection to ground in that case "raises" the voltage to zero.
A: No current will occur since there is no potential difference between the battery clemma an the Earth.
On the other hand, lightnings are happening pricisely due to existing such a potential difference.
A: The electrochemical reaction tries to maintain a constant potential difference between the magnesium and the copper with the copper being at a higher potential than the magnesium.
You can think of the electrochemical reaction a being like a pump which has the effect of producing a net movement of negative charges from one terminal (which becomes the positive terminal of the cell - copper) to the other terminal (which becomes the negative terminal of the cell - magnesium).
The excess charges on the two electrodes set up an electric field inside the cell in opposition to the migration of the charges and eventually the magnitude of that electric field is sufficient to stop the migration of charges between the two electrodes.  There is then a constant potential difference between the two terminals.
What you do not know is the potential of the earth relative to either of the two electrodes.
If the potential of the earth is the same as that of the magnesium then connecting the two together has no effect.
If the potential of the earth is higher than that of the magnesium electrode before a connection is made, then the potential of the copper must rise to maintain the constant potential difference between the copper and the magnesium.
There will therefore be a net migration of negative charges from the copper, through the cell, to the earth until the potential difference between copper and magnesium is the same as it was before the connection was made.
If the potential of the earth is lower than that of the magnesium electrode before a connection is made, then the potential of the copper must fall to maintain the constant potential difference between the copper and the magnesium.
There will therefore be a net migration of negative charges from the earth, through the cell, to the copper until the potential difference between copper and magnesium is the same as it was before the connection was made.
The statement since the earth is neutrally charged that was made is possibly the reason why the question was asked.  The important parameter is not the quantity of excess charge resident on the earth rather it is the potential difference between the earth and the copper/magnesium.
The removal of the salt bridge whilst the copper and magnesium are connected does indeed lead to a net migration of negative charges from the magnesium to the copper until the potential difference between the two is zero.
A: The situation of the extra electrons in the magnesium bar is different of a bar with an excess of electrons due to friction for example. In this second case, any connection with the earth tends to neutralize the bar.
But the system magnesium bar + electrolyte must be taken as a whole. The excess of electrons in the bar are not free only because they are far from the positive ions in the solution. So, connecting it to the earth is like breaking the glass of an aquarium with coral reefs and fishes, connecting it to the ocean. The fishes have nothing to actract them out from its source of food.
The same happens if the bars are connected without also connecting the solutions. We can not think of the electrons in each bar forggeting its
interactions with the ions.
Only after bars and solutions are connected we have another system, composed by the bars and the electrolyte, and a system out of equilibrium while the chemical reaction is running.
A: 
I have a question about what happens in following experiment: Assume we have a battery with two Galvanic half cell, eg a magnesium and a copper cell. Since copper has higher electrode potential that magnesium, the electrode with magnesium oxidizes and therefore becomes the negative terminal und the electrode with copper reduces and becomes positive terminal.

You first need to put some electrolyte in water. The left vessel will need magnesium sulfate and the right vessel copper (II) sulfate. They dissolve in water and we'll have Zn++ and SO₄-- ions floating in the left and Cu++ and SO₄-- in the right vessel.
Magnesium is more reactive and will lose electrons more readily than copper so the magnesium bar will become the negative terminal (anode). Doubly ionised Mg++ ions from the bar will join the other Mg++ ions in the solution. They will pull Cl- ions from the salt bridge. The Na+ ions from the salt bridge will dissolve in the right vessel and the Cu++ ions will stick to the copper cathode bar, which attracts it using the electrons it took from the magnesium bar. Presently, everything is neutral.
None of that happens of course until you connect the cathode to the anode with a conductor.

Question: What happens at the moment we connect the negative terminal (magnesium) having excess of electrons with earth und leave simultaneously the positive terminal unconnected?

If the copper terminal is unconnected, the magnesium bar does not have excess electrons. It has as many electrons as it has protons, it's electrically neutral. Connecting magnesium to the earth will have no effect. You might as well not connect it to anything. Also, there is neither positive nor negative terminal in a cell until you connect the terminals. A brand-new battery with a plus and a minus sign printed on it does not really have these terminals until you close that circuit; they become terminals in that instant. And because one metal is more eager to lose electrons than the other.
Nothing happens in the electrolyte either, the ions continue floating  unaware of the earth having been plugged in to the magnesium bar.

That seems to be quite similar to the question what happens immediately after we connect the positive to negative terminals of two Galvanic half cells but remove the salt bridge

Without the salt bridge, some electrons will be exchanged between magnesium and copper but not many because the loss/gain of electrons will make magnesium slighly positive, preventing it from donating any more electrons and the copper will become slightly negative and therefore less eager to accept electrons. Nothing will happen. You needed that salt bridge to maintain the reaction but now it will stop before it really begins.
And the magnesium bar will not remain slighly positively charged just because it's easier for it to lose electrons. Copper can lose electrons for magnesium as well just somewhat less often.
So basically you're under the incorrect impresion that there are excess electrons in the magnesium bar. I think this is the source of all the confusion.
Some additional remarks.
NOTHING travels across the bridge. Neither Mg nor Cu can travel across the bridge. The bridge has the job of keeping the electrolytes from mixing. However, it's filled with Na+Ch- which can leave the bridge and enter the vessels.
Next thing, metals have free electrons that are in constant motion and they are free to travel anywhere throughout the volume of the conductor. If you bring two pieces of metal in physical contact, their free electrons will now be able to cross from one to another, in both ways so there will be no net flow.
The Earth doesn't have the same propensity because it doesn't have as many free electrons as a metal, plus it's conductivity may be partially due to moisture. Earth is not objectively speaking as good a conductor as a metal, however it does a good job at conducting electricy dues to it's 3-dimensional geometry, whereas wires for example are one dimensional.
So there is a difference between metals and earth. Take also under consideration, the vastly varying orders of magnidute involved in electricity. There are about $6\cdot 10^{15}$ electrons per second in one miliampere, but there may be microamperes, picoamperes, at some point we would stop caring that there is a current if it's too small to detect. One electron is already a current. And absent electron generates electric field that will pull it back so we again have a current but in the opposite direction. This happens all the time but we won't measure it with any devices because it's quick and net is zero.
You need that salt bridge. You need all the parts for anything to happen.
