One of the things we learn about Jesus is that He was completely and fully obedient to the Father's will in everything. He never ceased to be God, but He did choose not to use His divinity in order to overcome temptation. Instead, He drew from the resources God makes available to humanity for victory. The first resource is obedience to the Father's will.
This particular doctrine is difficult to understand, and it is why so many groups reject the idea of the Trinity. Some try to explain Jesus as being less of God than the Father is God. Others try to say that God moved through different periods of existence as Father, then Son, and now Spirit (this idea is called Modalism). The Trinity, however, explains that God is three persons: Father, Son, and Spirit.
As Paul describes the obedience of Christ in Philippians 2:5-8, we learn a very important truth about this level of obedience. Jesus was to learn obedience in His humanity that would lead Him to the cross. It wasn't just mere obedience that He was to learn. It was absolute obedience so that He could accomplish the most difficult demand of His mission: becoming sin for us so that we might become the righteousness of God. It is even an obedience that was understood before Christ took on the flesh of humanity. He said in John 6:38 that He had come to earth, not to do His own will but to do the will of the One who sent Him (namely the Father). His obedience is seen, not only in the fact that Jesus was obedient to the Father while here on earth, but He was even obedient in making the decision to come to this earth.
What we learn from Christ is that genuine obedience is not partial obedience. If we desire to defeat temptation through obedience, we cannot decide what parts of obedience are good and what parts are undesirable. Obedience is not trying to figure out how close we can get to sin without really sinning. It is not trying to figure out how much we can be like the world without really being like the world. It is about totally and absolutely submitting to the will of the Father in everything we do and in everything we are. But that's why obedience is so difficult and why it is much easier to sin than it is to walk in righteousness.
Take a minute and examine your motives about why you do what you do. Do you serve, teach, preach, live, breath, and walk in direct obedience to God's will? Or do you add His will onto your decisions and desires? The kind of obedience that empowers us to overcome temptation is absolute obedience to the Father.