President Charles de Gaulle gained a solid reputation as a protector of moderate African governments by intervening militarily in black Africa three times in his 11 years in power.

In just the past year alone, President Valery Giscard d'Estain has committed French forces on five fronts in Africa and the Middle East.

French forces are on a war footing from Dakar in the west to Djibouti in the east. "If there's a solider who likes soldiering, the best army for him to be in these days is the French," commented a Western diplomat here.

But Giscard's commitments of men and material have been made largely against the counsels of prudence of his own soldiers and diplomats. The country's moderate commentators are also beginning to object.

"If the Americans are unwilling to carry the burden," was the way one French official summed up the establishment view, "then why should we be sticking our necks out to play gendarme?"

Since January, five French soldiers have died in combat in Chad. Just yesterday it was announced that a French public works official attached to the Djibouti government had been kidnapped by rebel tribesmen and spirited into neighboring Ethiopia.

French forces are variously engaged:

In air strikes to protect underpopulated Mauritania against incursions by the Algerian-backed and Soviet-armed Polisario guerrillas fighting for control of the former Spanish Samana, which Morocco and Mauritania also claim.

In Security missions for the hardpressed Chad government, which is threatened by Libyan-backed guerrillas. There are 1,200 to 1,500 French troops in Chad.

As United Nations peacekeepers in the former French mandate of Lebanon. Three French U.N soldiers have been killed there.

Protecting Djibouti with 4,000 troops. One of France's three aircraft carriers is stationed at all times off the Horn of Africa to protect French oil routes, reliable sources say.

Last year, the French carried out the military airlift of a Moroccan battlaion to Zaire to stop an invasion from Angola by former Katangese gendarmes.

Although French officials admit to nothing, it is widely assumed to informed circles that the recent resumption of outside arms supplies to the UNITA guerrillas of southern Angola includes an important French input. UNITA, a faction supported by the West in Angola's civil war, has continued to wage war against the ruling faction, supported by Cuba and the Soviet Union.

The justification given for all this French activity by Giscard's defenders is that France must fill the role abandoned by the United States since the Vietnam war and prevent Soviet efforts at destabilization in Africa.

Some critics say that the French play the same role for American interests in Africa as the Cubans do for the Soviets.

The French government says it only goes where it is invited by states with which it has military cooperation agreements. Those in the know claim that the French scrupulously avoid asking the Americans for their views before they commit themselves anywhere.

Yet, the United States makes it clear that it supports the French. The State Department last week declared its backing for French operations in Chad, the current French military action that is by far the most controversial inside the French establishment.

France's own interests in Africa suffice to explain Giscard's activities. Among the most ardent advocates of the French role are Morocco's King Hassa, Senegal's President Leopold Senghor and Ivory Coast President Felix Houphouet-Boigny. The three countries have the three largest groups of French citizens abroad (55,000 in Morocco, 40,000 in Ivory Coast and 24,000 in Senegal) with all the economic interests their presence implies.

Giscard is understood to have expressed the fear privatedly that if he does not support moderates like Senghor and Houphouet-Boigny, they or their successors will be forced to make accomodations with the Soviets and Cubans.

Those leaders are not likely to last much longer in any case. Senghor is 71 and Houphouet-Goigny 72. Already, King Hassan has been hedging his bets in trade agreements with Moscow, which badly needs Moroccan phosphates as fertilizer. The Soviets have been willing to deal with Hassan even at the risk of displeasing rival Algeria because Morocco is to phosphates what Saudi Arabia is to oil.

Senghor provides France with its most important base in black Africa. The 10 jaguar jets that harass the Polisario guerrillas when they enter Mauritania operate from near Dakar. Although the planes have fired in anger at the guerrillas only three times, informed sources say they fly reconnaissance and harassment missions constantly.

Paradoxically, French presence in the regions bordering the Sahara may be preventing a conflict that specialists think is bound to occur some day between the rival ambitions of Algeria and Libya to unite the Arabic-speaking nomadic tribes of the Sahara belt.

French forces are guarding against guerrillas backed by both Libya and Algeria. The two countries are armed and encouraged by Moscow.

Libyan leader Muammar Qaddafi, whose own nomadic family has roots in the part of northern Chad that Libya claims and, more distantly, in the former Spanish Sahara, has made clear that his dream is to unite the Saharan tribes in Mauritania, Mali, Niger, Chad and southern Algeria. Except for the Algerian tribes, the Moslem nomads are dominated by southern black populations that are animist, Christian and protected by France.

Algerian President Houari Boumediene's ambision is apparently to harness the tribes for Arab socialism. Senghor is said to label Boumediene privately as an anti-balck racist.

Sources close to Giscard point out that a Libyan-controlled Chad would leave Sudan, which is beign developed as the pro-Western breadbasket of the moderate Arab world, sandwiched between two potentially hostile neighbors to the east and west, Ethiopia and Chad.

The Egyptians and Saudis, who act the most threatened by the Soviet presence in Africa's horn, are said to be among the strongest proponents of French moves on the continent. One reliable source even suggested that the three countries worked together in a complicated military supply maneuver to aid Somalia.

The French, according to this source, supplied Saudi Arabia with tanks to allow Saudi Arabia to send tanks to Egypt, which was then in turn able to supply some of its Soviet-made tanks to the Somalia.

When reports appeared that French tanks had been supplied directly to Somalia by Saudi Arabia, however, the French went to great pains to deny the stories, apparently fearing severe repercussions in Djibouti, where French forces are highly exposed to Ethiopian attack.

Informed sources say there was a debate in the French foreign and defense ministries about arming Somalia, and that it was resolved in favor of refraining from doing anything that might arouse Ethiopia.

Despite the risk, Giscard, as one French diplomat put it, "has to prove himself to the Africans - De Gaulle didn't have to prove anything to earn their allegiance." The leaders of the French-speaking African states are to hold a summit meeting with Giscard in Paris toward the end of this month.

"The Elysee takes the view," said the diplomat, "that all of De Gaulle's pretentions to great-power status are finished, but that we need to show that we are a medium power that has the means and the willingness to make itself respected."

For many of Africa's moderates, France's newly resumed role as a regional gendarme seems welcome, making the French the only former colonial power that can still exercise its military muscle in Africa without arousing continent-wide hostility.