3 ms·
If you don't have `stage` how are you going to generate a commit which has only some of the changes you've done (potentially including partial commits from file
by nolemurs 10y ago
If you don't have `stage` how are you going to generate a commit which has only some of the changes you've done (potentially including partial commits from files)?
`stage` is unnecessary if you have a really simple workflow, but it provides a lot of flexibility at very little cognitive cost.
- recursive 10y agoBy specifying the parts you want to include when you commit. I think it's unnecessary for any reasonable work flow, and doesn't manage to break even on its benefit vs. cognitive cost.
- nolemurs 10y agoSo you want a long command line argument were you tag specific line numbers and have to get it all right at once? That sounds terrible to me. Being able to add bits and pieces to your staging area and then once you've got it all ready commit is pretty useful. I guess I just don't see the cognitive cost as being particularly high. It's a pretty simple model.
- krupan 10y agoYou can add bits and pieces to commits directly with commit --amend. The index is really not needed.
- recursive 10y agoI really would prefer not to even use a CLI for this operation, since I think it's not well suited to the kind of interaction commits entail. A "staging area" is a useful concept, but it's not one that needs to exist outside the UI of whatever tool you're using to generate the commit.
- lobster_johnson 10y ago"git add -p" generally negates the need for incremental staging, unless you have made two unrelated changes to the same diff hunks that need to be untangled.