I recommend "commit early, commit often" approach instead -- and rebase/squash before making a PR.<p>For those temp commits, I found out that even bad commit messages which would not be acceptable in any serious codebase ("reafctored foowidegt", "starts up but crashes in 3 sec", "cannot find unistd.h") are still very useful. And of course those commit messages are great placeholders for random notes ("TODO need to add unit test for zero input", "still need to hook up to main class")
This is basically a poor man's Dura (<a href="https://news.ycombinator.com/item?id=29784238" rel="nofollow">https://news.ycombinator.com/item?id=29784238</a>) in 20 lines of Bash that is run manually instead of using a background process and a timer.