
The code of conduct is (such as rigorous socio-moral discipline for the Sikhs) prescribed so that the Sikhs must remain pure and emancipated.
If a Sikh breaches the cardinal instructions of no hair cutting, no adultery, no use of intoxicants and no eating of Kutha meat, he is called Patit and the transgressor must get rebaptized. If a Sikh violates the code of conduct other than the four cardinal transgressions, he becomes Tankhaya and has to appear before the Panj Pyaras for undergoing Tankhah.
The study of Sikh Rehat Maryada published by Shiromani Gurdwara Parbandhak Committee Amritsar will answer many of the questions about Sikh way of life.
Views of different Sikh organizations, eminent Sikhs and Sikh bodies on Sikh Rehat Maryada were considered from 1936 to 1945. Sikh Reht Maryada was finally approved by Shiromani Gurdwara Parbandhak Committee vide its resolution No: 97 on February 3, 1945.
It was published by Shiromani Gurdwara Parbandhak Committee Amritsar in 1945 after deliberations with different Sikh Individuals and representatives of different organizations.
Refrence: https://www.sikhmissionarysociety.org/sms/smssikhism/codeofconduct
https://www.sikhmissionarysociety.org/sms/smspublications/rehatmaryada/contents.html