While I don't think there is a problem with making lots of small meaningful git commits, I agree you don't want lots of "testing" commits (this could make any conflicts during a rebase really painful to deal with as it replays them).
I'd look into whatever tool you're using to deploy to the cloud, and there should be a way to simply test/deploy/redeploy manually (e.g., instead of letting a githook trigger the even, trigger it by clicking rebuild/rerun).
I know Jenkins, Travis-CI, and Circle-CI, all have this functionality, and I'd expect most other build/deployment services allow this.
In the case each commit is to test a deployment/build configuration, such as .travis.yml, so that you might have 10 commits but only the last one makes the change you want. The teams I've worked on have used git merge --squash as @gnat suggests in these cases (or git reset --hard with copying out and back in the desired file but this is less "clean").