GitHub Protips- Tips, tricks, hacks, and secrets from Sarah Vessels
github.blog
github.blog
That being said, I can't think of any elegant ways to solve this.
I think having a decent grasp of interactive rebase would help with this flow, but not strictly necessary and author doesn’t mention it.
Although it has a great side effect of forcing atomic commits.