Under the threat of direct attacks on their mountain strongholds by Soviet troops, rebelling groups of Afghan tribesmen are trying again to unite into a common front, diplomatic sources here reported tonight.

Five different groups, many of whom have spent almost as much time fighting each other as the pro-Soviet government of Afghanistan, met in the Pakistani border city of Peshawar Thursday night in an effort to set up a unified command.

Significantly, though, representatives from one of the major groups of insurgents -- Sayeed Gaelani's Islamic and nationalistic Revolutionary Council -- declined to attend the reconciliation meeting.

The same rebel forces got together last fall when the Middle East Arab groups offered them $2 million to wage war against the Afghan government if they could unite. The coalition lasted only a few days before it split up.

This time, however, the incentive may be greater. Soviet troops, who took part in a coup eight days ago that placed their own man in power, have now fanned out throughout the countryside and, according to diplomatic reports reaching here, have begun for the first time to take a direct combat role in putting down the year-long Afghanistan rebellion.

Despite the presence of Soviet troops, the rebel groups are continuing to fight, according to diplomatic sources here and in the Pakistani capital of Islamabad.

There are increasing reports of regular Afghan army troops deserting to the rebels -- partially, diplomats here said, because of a national dislike for the Russians.

Diplomats quoted rebel sources -- who often exagerate their successes -- as saying that 10 soldiers guarding the Torkham Gate border post at the Khyber Pass moved into Pakistani territory Thursday night with their weapons. One was shot in the back and killed by loyal Afghan forces.

A group of soldiers manning a key mountain top fort overlooking the Khyber Pass also deserted, diplomats here said.

Meanwhile, Western diplomats returning from kabul told United News of India today that a Chinese-backed rebel group -- Shola-e-Javed -- has joined the fighting. The Diplomats knew the group had Chinese backing, UNI reported, because the Chinese embassy in Kabul gave a reception for then recently that drew a protest from the Afghan government.

In new Delhi, the Indian Ministry of External Affairs said that caretaker Prime Minister Charan Singh has advised President Carter against sending arms to Pakistan to counter the Soviet move into Afghanistan.

"The prime minister expressed reservations and doubts about the reported intention of the United States to increase arms supplies to Pakistan and emphasized that competitive introduction of arms into the region could only heighten tension and contribut to instability," a ministry spokesman said.

But he refused to say what worries India more: Soviet combat troops less than a two-hour flight away or new arms to Pakistan.

"Which country is closer?" asked the spokesman of the External Affairs Ministry. "Which country has gone to war with us twice?"