Hacker News new | ask | show | jobs
by ufo 2640 days ago
It is possible to use git stash for that. In addition to being conceptually simpler it also allows you to run tests on the “partial commit” before commiting it.
2 comments

git stash actually changes what's on the filesystem though (i.e. you cannot randomly open up something that is stashed in an arbitrary text editor).
You could always just unstash things, I suppose. In the context I was talking about, the stash is only used to prepare a commit, and after that you can unstash everything. For longer term stashing I think named branches you easily checkout are a better alternative.
+1 for git stash -- but I don't like the idea of eliminating the staging area.