Desktop: Stage files that are checked

Created on 19 Apr 2018  路  3Comments  路  Source: desktop/desktop

The previous version of GitHub Desktop would stage files when they were checked. This is really useful, because while Desktop is not feature-complete, there are some things that are only possible from the command line, and it's much easier to select files (and _particularly_ line selections) from Desktop.

This seems to have been mentioned in https://github.com/desktop/desktop/issues/60, but was never resolved as no-one mentioned wanting the staging behaviour.

In addition, now that https://github.com/desktop/desktop/pull/4188 has been merged, there's need for an extra distinction between selected files and staged files (at the moment, it's only relevant when clicking the "Commit" button).

more-info-needed

All 3 comments

@varkor thanks for the feedback.

The previous version of GitHub Desktop would stage files when they were checked.

I don't believe this is the case. Are you referring to the classic Mac or Window versions?

We've gone back and forth on keeping the index in sync with the list of changes in the Desktop UI for better interoperability with other tools, but for now I still think the current approach is fine.

I wrote up some notes here that describes what happens to the index when you do a commit inside the new Desktop app: https://github.com/desktop/desktop/issues/4408#issuecomment-379527584

I don't believe this is the case.

Ah, I must be misremembering. Maybe I had just always wanted it to be 鈥斅爄t's been a while since I used it 馃槃

We've gone back and forth on keeping the index in sync with the list of changes in the Desktop UI for better interoperability with other tools, but for now I still think the current approach is fine.

Although it would be most convenient it this occurred on checkbox change, having the ability (from a menu command, perhaps, to stay out of the way of inexperienced users) to perform the same action as described in https://github.com/desktop/desktop/issues/4408#issuecomment-379527584 _without_ committing (i.e. resetting the staged changes to those in GitHub Desktop) would be just as useful. https://github.com/desktop/desktop/issues/60 mentioned something about it being hard to maintain a unified diff (I'm not sure if this is still true) for each checkbox change, but presumably most of the functionality exists already, for committing, for a menu option.

Hey @varkor. As @shiftkey noted earlier we've decided on the approach of bypassing the index in Desktop. There's several pro's (as well as con's) to that approach but it's nevertheless the direction we've chosen. For now, if you want to stage individual lines in desktop and then continue on the command line I'd recommend making a commit with the changes you want and then running git reset --soft HEAD^ in the command line.

Was this page helpful?
0 / 5 - 0 ratings