how did Martinique gain independence

It didn't. Martinique is a department of France.

Martinique did not gain independence. Martinique is an overseas territory of France, which means it is an integral part of France. Therefore, it does not have its own sovereignty or the ability to become independent. As an overseas territory, Martinique benefits from a special status that grants it a certain level of autonomy within the framework of the French Republic. This includes local management of some areas such as education and culture. Ultimately, any potential change in Martinique's political status would require a decision from the French government and potentially a referendum involving the population of the territory.