No doubt, but He did not personally sin, He always resisted. How then does He understand when we fail to resist?
Sin separates us from God and even though Jesus didn't sin Himself He does understand how it feels to fail in that when He hung on the cross He took on all of our sins for us He bore them on Himself and for those brief hours He felt the total separation from God that sin causes. As God and sin just don't mix, but Jesus our Savior, our Creator, our God took on all of those sins at once and He died of a broken heart from the separation He felt from God. He cried My God, My God Why have you forsaken Me?
Jesus also knows exactly how we feel when we sin and He knows the results of those sins as there are consequences in sinning and also He knows and feels the separation our sins cause as we generally want to run and hide from God just as Adam and Eve did in the garden.
Believe and trust that Jesus fully understands how we feel when we fail and He has already paid the price for our failures. I hope this has helped you in some way with the question you have.