If you want to keep your car and are going to file for bankruptcy I would go to the lien holder and talk to them before hand and ask them what my options are. You may file against everyone else and not the lien holder on the vehicle.
Recently this happen to a friend of mine. There are new bankruptcy laws in place now and you might be out of luck. However, contact the car company because if you pay the car current and reaffirm it with the loan company it will probably be OK and you can get your car back. I believe depending on the state of repossession you have the right to obtain any items left in your vehicle too. They usually send you a letter where you can pick up your belongs. Good luck. I know this worked for my friend, but it will depend on the loan company and state laws, I believe.