Bankruptcy is a negative mark on your credit. However, for most people facing bankruptcy, their credit has already taken or will take a hit soon. Think of bankruptcy as putting a period at the end of a negative sentence that has been going on and on: Once you file bankruptcy, especially if you file for chapter 7, you stop the negative information that has been chasing you (missed payments, foreclosures, lawsuits, repossession, collections, etc.) from continuing to report on your credit. Now you can finally distance yourself from these negatives.
As you move forward in life, it falls further behind, having less and less of an impact on your credit. In the meantime, you establish a few positive lines of credit and maybe even continue paying off your car and house loan beyond bankruptcy. Anything you can do to create positive reporting will help to rebuild your credit. You can do it!