Hacker News new | past | comments | ask | show | jobs | submit login

Mercurial does have a staging area. It just defaults to including all previously-committed files, which IMHO is very sensible. Link to my previous comment on it:

https://news.ycombinator.com/item?id=21393972




What you describe is not a staging area, it is an interactive commit.

And, personally, I see no positive value in a staging area, given that you can achieve the same functionality via interactive commits or amending commits.


Ah, fair enough. So I suppose git's staging area has the additional benefit that you can stage some things and then shut your computer down and the staging will be there when you come back.

I have no idea whether tortoisehg remembers the state of what you've selected in its 'interactive commit' GUI, because I've only ever made those decisions when committing. Given I've been using it almost daily for about six years on a community project (i.e. not just linear commits by a single dev who doesn't need to care about anyone else), I think this is also evidence that a persistent staging area isn't super important.


staging interacts with other commands as well. You can stage a bunch of stuff then revert or stash the rest, you can stash everything in the staging area, you can diff only stuff in the staging area and so on.

It basically acts as a clipboard. Possibly hg interactive commits work in the same way, but then I do not know how that would be different from a staging area.


Using commits for staging needs fewer different commands and prevents accidentally resetting or discarding changes.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: