The stuff you wrote is always captured in a commit and never in some weird lingering (uncommitted) state.
Treat the HEAD commit like your staging area. Split it as you will, pick stuff you like, remove stuff you don't want and push it to a different commit, etc. Feel free to rewrite history as you will (that you haven't exposed publicly, for others to depend on).