In Genesis chapter 12 the Lord told Abram to leave his country and leave his people and his father's household to go into the land that He told Abram to go to.
2 "I will make you into a great nation
and I will bless you;
I will make your name great,
and you will be a blessing.
3 I will bless those who bless you,
and whoever curses you I will curse;
and all peoples on earth
will be blessed through you."
4 So Abram left, as the LORD had told him; and Lot went with him. Abram was seventy-five years old when he set out from Haran. 5 He took his wife Sarai, his nephew Lot, all the possessions they had accumulated and the people they had acquired in Haran, and they set out for the land of Canaan, and they arrived there.
6 Abram traveled through the land as far as the site of the great tree of Moreh at Shechem. At that time the Canaanites were in the land. 7 The LORD appeared to Abram and said, "To your offspring [a] I will give this land." So he built an altar there to the LORD, who had appeared to him.
8 From there he went on toward the hills east of Bethel and pitched his tent, with Bethel on the west and Ai on the east. There he built an altar to the LORD and called on the name of the LORD. 9 Then Abram set out and continued toward the Negev.
This clearly teaches that Abram and his family would be blessed because of his complete obedience and surrender to the Lord God Almighty, and because of this, God blessed the generations of Abram and his family. This is a great lesson for us as well, God will bless us if we are willing to completely obey the Lord and surrender our lives to His will.
Abram in Egypt
10 Now there was a famine in the land, and Abram went down to Egypt to live there for a while because the famine was severe. 11 As he was about to enter Egypt, he said to his wife Sarai, "I know what a beautiful woman you are. 12 When the Egyptians see you, they will say, 'This is his wife.' Then they will kill me but will let you live. 13 Say you are my sister, so that I will be treated well for your sake and my life will be spared because of you."
14 When Abram came to Egypt, the Egyptians saw that she was a very beautiful woman. 15 And when Pharaoh's officials saw her, they praised her to Pharaoh, and she was taken into his palace. 16 He treated Abram well for her sake, and Abram acquired sheep and cattle, male and female donkeys, menservants and maidservants, and camels.
17 But the LORD inflicted serious diseases on Pharaoh and his household because of Abram's wife Sarai. 18 So Pharaoh summoned Abram. "What have you done to me?" he said. "Why didn't you tell me she was your wife? 19 Why did you say, 'She is my sister,' so that I took her to be my wife? Now then, here is your wife. Take her and go!" 20 Then Pharaoh gave orders about Abram to his men, and they sent him on his way, with his wife and everything he had.
Now, having said that God can bless you for obeying him completely, you yourself can mess up and you can lie to get your way, and God will allow you try to get yourself out of a situation, but only when you admit your wrong doing, and turn to God and completely trust His will for your life, then you will be blessed by God and live an honorable and pleasing life to God.