|
|
|
|
|
by waqf
5453 days ago
|
|
> [W]ithout [the index], you wouldn't be able to create commits from a subset of the difference between your working directory and HEAD. That's a correct argument for why the index has to be separate from your working directory. But I don't see why the index has to be separate from HEAD ... in my model, every "git add" would automatically be followed by an implicit "git commit --amend". So instead of building up your commit in the index you build it directly onto HEAD. Since you're remotely sane, of course HEAD is a private branch not a public one (because you're perpetually modifying "history" on it). (And to start a new commit, of course you also need a command which advances HEAD by creating an empty commit.) To put it another way, the index should be just another branch. The git commands are way too complex because they don't treat it orthogonally. |
|