Hacker News new | ask | show | jobs
by yencabulator 2046 days ago
> In Git tho the staging area is a lie. It encourages you commit half-truths. What I'd really want is to be able to enter a commit mode where the on-disk and staging area roles are flipped.

https://github.com/tv42/staged does something like that by writing the staged content to a temp dir.

(It has some smarts for Go GOPATH adjusting on top, but might not do things right with modules, at this time.)

1 comments

Thinking about it, I guess it should be possible to flip this around by using a temporary local branch. Commit everything there, then cherry-pick into repo dir and commit proper.

Once done delete temp branch and push.