Although Hindus didn't call themselves Hindus when he lived, he would have been born a Hindu. What factors pushed him away from Hinduism? I can think of two - He was against the caste system and did not believe in the authority of the Vedas or Vedic sacrifices. But still there must have been enough commonalities for Hindus to regard him as an incarnation of Vishnu and for Sankara's critics to call him a "hidden Buddhist"
In Dhp 279 and many other suttas, Gautama Buddha taught that in all phenomena there is no self (atman).
In MN 95, he did not accept the authority of the Vedas.
In MN 38, he taught six types of consciousness which dependently arise based on the six media of eyes, ears, nose, tongue, body and mind i.e. eye-consciousness, ear-consciousness, mind-consciousness etc. He taught that consciousness does not occur independently of these six media. This disagrees with Advaita Vedanta.
In SN 7.9, he rejected the notion of varna/ caste by birth, stating "don’t ask about birth, ask about conduct," when someone asked him about his (Buddha's) varna /caste at birth.
In SN 7.7, he said that austerities does not make one pure and chanting mantras do not make one a brahmin, stating instead that accomplishment in conduct or virtue, and knowledge determines a brahmin.
In SN 7.21, he rejected the view that purification rites using water can wash away sins, stating instead to dip oneself in the shores of the lake of virtue, to purify oneself.
In DN 31, he rejected the ritualism behind the Vedic bath prayer ceremony practised by a young householder by the name of Sigala, and put a new spin on it.
In SN 42.6, he rejected the use of funeral rites to help the deceased go to heaven, stating instead that it is a person's deeds during their lifetime which determines their outcome, and not rituals performed after death.
In SN 42.3, he rejected the view that a warrior performing his duty to fight in war, will allow him to go to heaven after death, if he gets killed in battle.
In DN 2, he forbade his monks from doing fire oblations or fire sacrifices, practising astrology, reading omens, interpreting dreams, calculating auspicious dates for marriages, consecrating sites for construction and worshipping the Sun etc.
His agreement with Hinduism was on virtue, ethics and good conduct.