+1
Completed

Add a stage-changed (stage-all) command in Standard Window to stage all files at once

terablade2001 8 months ago updated by Marc Strapetz 8 months ago 7

Hi.

Coming from other git handlers (i.e. like git-gui, etc) I can't find a 'stage-changed' command in order to automatically stage all the changed files in the Standard Window. One solution is to select all files and press the stage button. I also noticed that in Worktree window, the stage button opens a pop-up window to select which files to stage, by having as default all files selected. Thus there are workarounds. But, in the Standard Window, a simple button to stage all changes would be really useful.

Unless you have this functionality already - and I don't see it - please add it! There is no reason to stage one-by-one the files as a default behavior. The default behavior I think is to stage all files, unless we have a reason to stage specific files. And there is no reason to open second window (which we may need to close afterwards) just for a stage-all case.

Thanks!

If you want to stage all files to commit all files, forget the stage and commit. You will be asked whether to commit the selected file or all files.

What do you mean with the "forget the stage and commit"?.. It seems like an option but where can I find this option? I can not see something related in preferences.

I was thinking just to be a "stage-all" button, to automatically stage all the files without any extra step (I've seen this button in different git guis)?

Please describe your full workflow so I understand why you need it. In other Git clients you need it, because they can't commit without staging. In SmartGit, however, you can commit without staging first.

Well, my general workflow is everytime I want to make a new commit, to stage all changed files first (that's why I want such a stage-all button), and then quick-look in the staged list if there are -via low probability- files that I don't want to commit (autogenerated files, etc) which I unstage and handle afterward the commit. Coming from other GUIs this is the way I learned to use it. Thus the lack of the "stage-all" button in the standard window which I mostly use, especially if there are many files to be changed in a commit, it makes me feel "uncomfortable" as I am trying to find other 'sideways' to achieve what I want.

Thanks for the explanation.

Do you want to get a feature to stage all committable files or all visible committable files? The difference between becomes obvious, if you have selected just a directory (instead of the repository root) or filtered the file list by name.

Do you need a toolbar button or would be a menu item with keyboard shortcut be sufficient?

I think the best approach is to stage all the visible committable files, as you can always have selected the `.` (root) folder to stage all the changes at once. I found recently myself in a situation where I didn't want to stage all the (many) files, but to stage all the files per folder which I was looking at (thus visible committable files), verifying they are correct in each folder. Thus the "visible committable files" depending the folder you have select, seems to be the optimal solution from my small experience in smartgit. Because they gives you the advantage of staging via easy filtering (via folders etc).

The first thing I caught myself looking for in smartgit when tied to stage files, is a "stage-all" button right next to the "Stage" button. I looked even in the preferences if there is any option to enable such a button. Eventually ended here asking for this feature. Thus I think this is what I need. A "big" toolbar button right next to the big "Stage" button.

And, I think it should also exist an "Unstage-All" button also next to the "Unstage" button (imagine accidentally staging a folder with 100+ data-trash items, you probably need a intuitive easy way to undo it)

+1
Completed

23.1 Preview build 20116 will contain experimental Low-Level Properties "standard.actions.stageAll" and "standard.actions.unstageAll" to unlock such actions.