As a general rule, you should use a consistent coding style in one project.
If your project previously had a consistent style (that was not yours) and you accidentally formatted it with your coding style, then you can:
- create a project-specific formatter that is consistent with the previous coding style
- apply this formatting to the whole project
- commit again
If your project didn't have such consistency, then it's time to choose one style and apply it. However, such a commit should be separated from a commit containing actual changes in the code. Therefore you can:
- Use Eclipse's local history to revert the formatting (as @Seelenvirtuose suggested)
- Commit your actual code changes
- Choose one coding style for the project
- Create a project-specific formatter for the chosen style
- Reformat the project with this new formatter
- Do another commit with only style changes this time