If your started working on a feature and have some minimal skeleton covered with tests, commit. Remove all the messy commented out code. Then, with every new logic change, commit. In zsh shell if you issue gwip, a commit with a --wip-- in it is added.

gwip

[super-feature f0f0f0] --wip-- [skip ci]

Look at the [skip ci] flag. If you have continuous integration and when you push changes to a branch that is a pull request, specs run.
Most often you don’t want to run those specs until a feature changes from in progess to review me. [skip ci] does not trigger a new build which can be a desired action until you ready to let your colleague know to start quality assurance.
This protip has been written in 316 seconds