Sardar term used in Gurbani too, in spiritual sense. The one who follows the Lord’s Hukam is called Sirdar. Gurbani do not believe in temporal people calling themselves Sardars, and have no knowledge what hukam is.
The word was associated with Sikhs, from Misl Period, when Sikhs keep on captured Afghans areas. They were called Sardar by them. During time of Gurus, the sardar was not associated with Sikhs. Neither of Sikh used it, before Misl period. Khalsa was the surname/prefix name and Singh was surname, given by Guru Gobind Singh when he made Panth. It was adopted for the leaders of their jathas or bands fighting against Afghan invaders under Ahmad Shah Durrani. With the expansion of the fighting force of the Sikhs under the misls the number of Sikh sardars multiplied. During the reign of Maharaja Ranjit Singh and his successors, sardar came to be used as an appellation for all ready Sikhs as well as for Sikhs in general having Singh as their common surname, although officially sardar was a coveted title conferred on generals or civil officers of rank.
The British government also used the word selectively by incorporating it in the titles of sardar sahib and sardar bahadur conferred mostly, but not exclusively, on Sikhs. In the Sikh princely states of Patiala, Nabha, Jind, Kapurthala, Faridkot and Kalsia, too, sardar signified rank irrespective of the religious affiliation of the official so entitled. In the army, both under the British and in free India, junior commissioned officers called Viceroy’s Commissioned Officers (V. C. Os) before independence are referred to as sardar sahiban. Generally, every turbaned Sikh with unshorn hair is addressed as sardarji, and it is customary to use sardar in place of “Mr.” before a Sikh name. Nihung Sikhs do not use Sardar word. They used either Khalsa or Akali.