3 ms·
I agree with most of what you said but I strongly disagree with the following: >Separation of the stages of adding files with committing, I think the default s
by eriknstr 10y ago
I agree with most of what you said but I strongly disagree with the following:
>Separation of the stages of adding files with committing, I think the default should be combined, with options to separate the stages if required.
My workflow is I make changes which may include many files. Once I'm done with the changes, I like to list the files that have changed, look over the changes to ensure that I don't have any unrelated changes, and if I do then I use "git add -p" for the files that I only want to add part of the changes for, and so at the point where I do that, I need to be able to add files in multiple steps because I only use "git add -p" for the files that need it, and for the remaining files I do regular "git add" since there is no point in having to go through the "git add -p" process with those. Once I have all my changes staged so far, I sometimes remember that there was yet another file that needed to change, so I change that file and stage it for commit. When I'm ready to commit, I review the whole diff that is staged for commit and then I commit it. To me, separate stages of adding files with committing is the only sane default.
- grey-area 10y agoThis does depend how you work and what you're working on. Since the default is your workflow, it'd be nice to have a command which dealt with the workflow of only changing files you wish to be in the next commit (which I imagine is also very common).
- jeremy_wiebe 10y agoWouldn't a simple shell alias for `git commit -am` solve this?
- grey-area 10y agoThat's what I do but we were discussing the git UI, which has many examples like this.