Bankrate.com has a good article on rebuilding credit after bankruptcy. The key take away from the article is that your access to credit after bankruptcy increases with time. The article includes discussions on Chapter 7 and Chapter 13 Bankruptcies.
As to Chapter 7, the article notes that after filing a Chapter 7 discharge, you will be classified as a subprime borrower.
Subprime borrowers pay higher interest rates and penalties for defaults because they are considered a greater risk.
On the other hand, after a Chapter 7 Bankruptcy you are much better credit risk because the bankruptcy discharge dramatically reduces the debtor’s debt-to-income ratio.
You also eliminate your ability to qualify for Chapter 7 for another eight years. In the eyes of a potential lender, you may actually appear to be a better risk immediately.
As to Chapter 13, the article notes that a Chapter 13 Plan can instill financial discipline in debtors because they’ve had to live under a strict budget according to payment plans
The article also provides some good guidelines for applying for credit after bankruptcy. For example, the article notes that you should keep a close eye on your credit report and score. As a rule of thumb, you should wait until your credit score is 650 or higher before applying for new credit. The theme is that you should show patience in rebuilding your credit and score.
The article also stresses the importance of saving. There are numerous reasons to save at least 10% of your income. First and foremost, you can build an emergency fund. An emergency fund is important to prevent financial crises that can occur when a car breaks down, when a child gets sick, or you get laid off. If you a financial cushion, you can prevent the cascading difficulties that come from payday loans and other high interest borrowing that you’re forced into when you have no other choice.
As with many other sources, the article suggests getting a secured credit card to help build credit. What the article doesn’t mention is, that when you get a secured credit card, you need to keep the ratio of credit usage low, to no more than 30% of available credit. This is important because credit usage is an important factor in determining your credit score. 
The article concludes with a discussion of buying a home or a car after bankruptcy. Most debtors with regular pay can qualify for a car loan immediately after getting a bankruptcy discharge. Indeed, there are several companies that specialize in lending to consumers post-bankruptcy.
Credit-impaired borrowers should prepare to pay interest rates that are 2 points to 3 points over conventional rates.
As to purchasing a home, the article notes that
[m]ost experts say that it will take 18 to 24 months before a bankrupt consumer, who has re-established good credit, can secure a mortgage loan after personal bankruptcy discharge.
We have more information about qualifying for a home loan after bankruptcy here.
 “[T]here is a strong correlation between credit card utilization rates and credit scores. Generally, those who had a lower utilization rate had a higher score and vice versa – with an exception for those with 0 percent utilization. The average credit score of those who had a utilization rate of 0 percent was actually lower than the average score of those who had a utilization rate of 1-20%.” https://www.creditkarma.com/article/CreditCardUtilizationAndScore