The yogis were primarily associated with the Yogic-traditions promoted by the great Nath saints, e.g. Matsyendranath, Gorakshanath, Chauranginath etc. Hatha yoga is considered as the prominent part of those traditions promoted by these great Nath masters. The Nath Sampradaya is considered as a development of the earlier Siddha or Avadhuta Sampradaya, an ancient lineage of spiritual masters. The Nath yogis are classical followers of Shaivism; it was not a caste it is followed by different communities it was a sect within Hindu religion.
In 1567, Jogis (Giris) and Sannyasi (Puris) battled each other as detailed in the Tabaqat-i-Akbari, both are 2 of the 10 akharas (orders) of Dashanami Sampradaya. Puris were outnumbered by 200 to 500 by Jogis, Akbar asked his soldiers to smear ash and join Puris to help them, this led to the victory of Puris.
The principles of Yoga philosophy of Nath tradition are stated in Sanskrit texts such as Gorakshagita, Goraksha Paddhati, Siddha Siddhanta Paddhati, Amaraugha Sasana, Amaraugha Prabodha, Mahartha Manjari, Gheranda Samhita. Hatha yoga includes disciplines, postures (asana), purification procedures (shatkriya), gestures (mudra), breathing (pranayama), meditation (dhyana), samadhi.
The Nath tradition is a syncretic Yoga and Vedanta schools of Hindu philosophy based Shaiva tradition, that reveres Shiva and Dattatreya. Its founding is attributed to the ideas of Matsyendranath and Gorakshanath, developed further with an additional seven other Siddha Yoga Gurus called "Naths" (literally, lords). The Nath Yogi sampradaya and monastic organizations grew starting with the 13th century, with its matha headquarters in Gorakhpur, Uttar Pradesh. Many of their mathas are found in the northern, central and western states of India particularly in the Himalayas, but archeological inscriptions suggest their mathas existed in south India as well. The early Nath monks received endowments in Karnataka, for example, between the 10th and 13th century, which later became a temple and Shaiva matha hub for them near Mangalore. The Kadri matha, for instance, is one of the legendary monasteries in the Nath tradition which attracted converts from Buddhism and infusion of Buddhist ideas into Shaivism.
Nath Shaiva monastic organization was one of those Hindu monk groups that militarized and took up arms following the Muslim conquest of India, to resist persecution. They were scorned and persecuted by Mughal Empire officials, and by social, cultural and religious elites. However, the Nath yogi monks have been very popular with the rural population in South Asia since medieval times.
The Nath tradition of Shaivism is credited with establishing numerous Shiva Hindu temples and monasteries, particularly in Gujarat, Maharashtra, Madhya Pradesh, Uttar Pradesh, Himachal Pradesh, north Bihar, and Nepal.
In British colonial census, Yogi Nath were classified as a Bengali Hindu caste descended from the Nath Sampradaya (sect). Many of them then settled in the outlying tracts of eastern Bengal, especially in the districts of Sylhet, Tipperah, Noakhali, Chittagong, Mymensingh and Dhaka. Many of the yogis adopted weaving as profession.