Ganesh is an attribute of Waheguru, specifically the intellectual attribute. ਜੋ ਸੁਖ ਨਿੱਤ ਪ੍ਰਕਾਸ਼ ਵਿਭੁ ਨਾਮ ਰੂਪ ਆਧਾਰ ॥ That Blissful, Everlasting, Consciousness, which is the support of all Names and Form [Maya].
ਮਤਿ ਨ ਲਖੇ ਜਿਹਿ ਮਤਿ ਲਖੈ ਸੋ ਮੈਂ ਸ਼ੁੱਧ ਅਪਾਰ ॥1।
[That non-dual] which is not understandable with the mind [which is engrossed with vices] yet understandable with the mind [which has wisdom and unattached], I am that Pure Infinite [non-dual Being].
[An uncertain pupil asks Nichal Das; why have you not first paid salutation to Shiv Ji or other important deities? Response below]
ਅਬਧਿ ਅਪਾਰ ਸਰੂਪ ਮਮ ਲਹਰੀ ਵਿਸ਼ਨ ਮਹੇਸ਼ ॥
I am That limitless, infinite form, whose waves are Vishnu and Shiva.
ਵਿਧਿ ਰਵਿ ਚੰਦਾ ਵਰੁਣ ਯਮ ਸ਼ਕਤਿ ਧਨੇਸ਼ ਗਨੇਸ਼ ॥2॥
[my waves are] Brahma, the Sun, Moon, Varun Devta, the Messenger of Death, Shakti, Kuber, Ganesh.
Vichar Sagar, Page 1