The history of yoga is divided into four broad categories:
The ancient texts of Vedas are the oldest scriptures in the world. The Sanskrit word Veda means "knowledge" and rig means "praise". Thus the Rig Vedas are a collection of hymns that are in praise of a higher power. Other three Vedas are Yajur Veda (knowledge of sacrifice), Sama Veda (Knowledge of chants), and Atharvana Veda (knowledge of Atharvana).
Vedic Yoga can also be called Archaic Yoga, as people believed in a ritualistic way of life. Rituals, sacrifices, and ceremonies existed because they were considered a means of connection to the spirit world. People turned to rishis or Vedic yogis for illumination. Vedic masters were blessed with a vision of the supreme reality and their hymns speak of their marvelous intuitions.
This covers an extensive period of approximately 2,000 years until the second century. Gnostic texts, called the Upanishads, that spoke in detail about the self and ultimate reality appeared. There are approximately 200 Upanishads. One of the most remarkable yoga scriptures is the Bhagavad-Gita, which was composed around 500 B.C.
The central teaching of the Gita is, to do ones' duty and not expect the fruit of the action.
In 1200 BC the great teacher Rishaba, who was the exponent of the tradition of Jainism, also emphasized on efforts dedicated to the liberation of the spirit.
It was during this time, that Yoga found its way into Buddhism too; Lord Buddha was the first Buddhist to study Yoga. Buddhist scriptures lay stress on meditation and physical postures, which are Yogic processes.