I would urge against commiting incomplete code. It really is a matter of opinion and process but for my team of 12 working on a large project keeping our git history clean is really helpful.
Some more tips to consider:
If you need to port code to another machine to continue working you can create a patch file:
git diff > patchfile git apply patchfile
Or, if you do commit a temporary commit you could also squash the commits together using interactive rebase
git rebase -i HEAD~2
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I would urge against commiting incomplete code. It really is a matter of opinion and process but for my team of 12 working on a large project keeping our git history clean is really helpful.
Some more tips to consider:
If you need to port code to another machine to continue working you can create a patch file:
git diff > patchfile
git apply patchfile
Or, if you do commit a temporary commit you could also squash the commits together using interactive rebase
git rebase -i HEAD~2