3 ms·
The staging area is incredibly useful. It's not the functionality that's the problem, it's the interface. To design a great interface, first you have to come
by bryanlarsen 10y ago
The staging area is incredibly useful. It's not the functionality that's the problem, it's the interface.
To design a great interface, first you have to come up with a good metaphor and a great name. That's the first obvious fail, because the staging area has at least three different names in common use. As you said yourself, once you use a metaphor to explain the staging area, it just clicks. With a good name, the metaphor should be obvious.
And then you have to supply a consistent, non-surprising interface. What's the staging area? It's essentially a commit-in-progress. So why does it have a different interface than git commit --amend?
Grumpy me is really disappointed that git itself subsumed the porcelain. There were some really good ideas floating out there that fell by the wayside as git became usable by itself.
Stacked Git, for instance: http://www.procode.org/stgit/ http://www.procode.org/stgit/
We should have had a bunch of porcelains that evolved to a nice shine. You should have been able to switch back and forth between porcelains.
- lloeki 10y ago> What's the staging area? It's essentially a commit-in-progress Aha, that's where the typical view of VCSes shows through the cracks of our old habits: here commit is not an object, it's an action. So there's no "commit-in-progress" because either you commit or you don't, and the operation is virtually atomic. The fact that object with badcafe sha1 records the history of that action and is called "commit badcafe" in the log is incidental, and we're being abusive when we're literally saying the commit is the object. So when you say git commit --amend, it's really no different than git commit, because you're just telling it to do the very same thing, only with a git reset HEAD^ before that. That said, I'll readily admit the UI is poor, mostly because it's grown, not designed.
- bryanlarsen 10y agoIn my view of git, commit is very definitely an object, the action is 'creating a commit object'. I don't think either of us is wrong, we just use different names, making communication very difficult. Which just underscores my original point. Names matter.
- alphapapa 10y ago> We should have had a bunch of porcelains that evolved to a nice shine. You should have been able to switch back and forth between porcelains. That's basically what Magit is, a porcelain for git. It actually adds operations beyond what git's own porcelain allows, and makes easier the ones it does allow. Using Magit is like being a git ninja compared to using the CLI.
- bryanlarsen 10y agoTrue, I love magit. Most people here in the office use magit or one of the available GUI's. But none of them change the underlying metaphor in the way that stacked git did.