When Joshua was leading the children of Israel into the promised land, they saw many great victories, but in Joshua 7 we see them lose ground because of the sin of Achan. Recovery of that lost ground was not an easy achievement--it never is. When we chose to live in willful disobedience, we may find ourselves living for years without the blessing of God. If we would remember that, we might find it more difficult to choose to sin.
Read through Joshua 8. The Lord gave Joshua hope after their defeat at Ai. He told him in Joshua 8:1-2 that the ground would be regained. Aren't you thankful that God will not hold your past defeats against you, if you will repent and move on?! The Psalmist said, "If thou, Lord, shouldst mark iniquities, who shall stand? But there is forgiveness with thee, that thou mayest be feared. I wait for the Lord, my soul doth wait, and in his word do I hope" (Psalm 130:3-5). Believer, the Lord will not abandon you because you lost a battle. The victory is already yours! Joshua's army lost the first battle because of sin, but they could lose this second battle because of unbelief. Trust Him and His Word!
The war for recovery that Joshua had to fight could not be won with a half-hearted attitude toward the enemy (when they first fought Ai, they sent only 3,000 men). Joshua chose out 30,000 mighty men of valour and sent them away for an ambush. He had a God-given strategy for winning the war, involving "all the people of war." What is your strategy for regaining the lost ground in your life? Do you have a lackadaisical attitude toward the enemy? We are to put on the "whole armour of God, that ye may be able to stand against the wiles of the devil" (Ephesians 6:11). We are not ignorant of the devices of our enemy (2 Corinthians 2:11), and must base our fight upon the directives found within the Scriptures. If your strategy is not based upon the commands of God, you will find yourself following the counsels of the world, and will be more entangled than ever.
After their victory they traveled about 30 miles in order to obey the command of God to worship at Mount Ebal (Joshua 8:30-35, See Deuteronomy 11:29-30; 27:1-8). Here they renewed their covenant with God, their commitment to the Word of God (Joshua 8:32, See Deuteronomy 27:8), and the consecration of their families (Joshua 8:35, See Deuteronomy 29:10-13). When you find yourself in defeat, don't lose heart. Take courage, repent of your sin, and follow the Word of God in order to correct it. Renew your dedication to worship God aright. Commit yourself to the obedience of the Word of God, and consecrate your family to the Lord and His service. You can live a victorious Christian life, in the midst of great battles, the Lord fighting for you, if you will keep Him and His Word always before your eyes!