10 ms·
> It's really just a matter of habit and getting used to no staging area takes short and has huge benefits. Sorry, but no. "No staging area" is what VCSes wer
by chungy 4y ago
> It's really just a matter of habit and getting used to no staging area takes short and has huge benefits.
Sorry, but no. "No staging area" is what VCSes were like before Git and it was worse, much worse.
- still_grokking 4y agoWould support that. The staging area is one of the things that make Git shine, imho. It would be very difficult to handle quite some "WIP situations" without the staging area.
- alwillis 4y agoI think there’s some Stockholm Syndrome [1] thing going on with the staging area. It confuses noobies and it’s easy to make mistakes. I think we’ll be okay with this stack workflow [2] taken from Mercurial’s Evolve command [3]. [1]: https://en.wikipedia.org/wiki/Stockholm_syndrome https://en.wikipedia.org/wiki/Stockholm_syndrome [2]: https://sapling-scm.com/docs/overview/stacks https://sapling-scm.com/docs/overview/stacks [3]: https://www.mercurial-scm.org/doc/evolution/tutorials/topic-tutorial.html https://www.mercurial-scm.org/doc/evolution/tutorials/topic-...
- chungy 4y ago> I think there’s some Stockholm Syndrome I lived through the alternative and the staging area is superior. If it wasn't, I might not be using Git, or at least begrudge when I have to; neither is the case.
- guytv 4y agoIsn't the staging area just a stack of changes where stack height == 1?
- still_grokking 4y agoSure. And a branch is also just a stack of changes… The whole point is that this things are treated differently.
- tome 4y agoBut a branch is a commit but the staging area is an index, which is something different. Why two different concepts when one would do? That's my problem with the staging area.
- still_grokking 4y agoI don't care how this is implemented. You may be right that the implementation could be more streamlined. But I care only about the functionality. The whole point is to have some form of "draft commit". The staging area lets me "stash" WIP changes in a transparent way. Having a "draft commit" feature avoids the need to rewrite "bad commits" after the fact. The staging area is really useful to build up commits gradually. When thinking about it I've just realized that the staging area should not only be kept as a feature but could be even extended. You could add a "change-set management system"—which would be essentially multiple staging areas (maybe coupled to improved stash functionality to be able to quickly move / copy changes between change-sets). Yes, such a thing would very likely need to be built on top of the mechanics behind branches / commits. But this should be transparent and not interfere with the said features, imho.
- still_grokking 4y agoWhich part of the stack features would replace the staging area? I see nothing in this regard. Was the right documentation site linked? I also don't see anything that couldn't be trivially added to Git. A few lines of shell script would likely suffice. What do I miss here?