If you're working in a feature branch I don't think it would be that much of a problem to be honest. Just be sure to squash the commits before writing the pull request later on.
You can squash or rebase history in Git, which basically means you compress all your changes into a single one. People use this to keep a clean history.