In Genesis 15:6 it says that Abraham believed God and it was credited to him as righteousness.
This was long before the cross when Jesus spilled His blood to make us righteous, to bring us into right relationship with the Father (Romans 5:9) The King James Version uses the word "justified". In the original, justified means judicial-approved in a legal sense and it means to defend the cause of.
Living a righteous life is to under God is our defense who bore our sinful offenses - God being the offend party - yet, through His blood, we are made righteous i.e. judicial- approved before Him. Defending your own righteousness is foolish and is evident of a heart of unbelief!
For you see, Abraham was fully persuaded God would do what He promised (Romans 4:21). To be fully persuaded requires trust, faith in the power of God to fulfill His promises.
How many of us desire to live righteously but we are not fully convinced God will do as He promised? Instead of trusting Him, we find ourselves justifying and rationalizing why we decided to take matters in our own hands. But anything short of faith in God is unbelief - a terrible sin that affronts the very attributes of God! God is who all powerful, all sufficient, the One who can far exceed our heart's desire by answering our cry, if only we believe Him!
It's no wonder we don't experience so much a "credit" but a "debit" in our spiritual life because we limit the scope and power of God to perform His word! We are running in the red, exhausted, frustrated and wonder why our prayers seem hollow and empty.
Beloved, in Galatians 3:6 the word credit comes from the Greek word, logizomai which means to reckon, to take into account. Abraham reckoned God's power to perform His promise - God being the Logos, the very Word of God.
Let's resolve in our hearts to reckon God's faithfulness and power to perform what He promised us. And let's account for the unbelief in our hearts. When we learn to trust Him, being fully persuaded in His power to act, we learn what it is to truly be righteous people of God.