Can VS Code display modified files by folder in git version manager?

look at the screenshot:

modified files in git

vscode lists all modified files, and shows which folder the file belongs to, but it is not clear enough, I want modified files to be displayed by folder, just like in file tree. is it possible?


You can't do that, yet.

There is an open issue which asks a few improvements for the Git tab, and one of the comments asks for "Sort by folder".

You should upvote on that issue, making it more visible to the VS Code team.


It appears the issue 40712 "SCM: Support sort" (mentioned by alefragnani) might finally (for VSCode 1.47, June 2020) be resolved.

See PR 99768 "View/Sort feature for SCM viewlet", which proposes:

  • a sort by status
  • a sort by path

See View sort:

View and Sort

We have added support for sorting your changes in the source control view by name, path (default), and state when using the list view option.
We have consolidated the view options (list vs. tree) and sort options into a new View & Sort menu item in the context menu.

https://github.com/microsoft/vscode-docs/raw/vnext/release-notes/images/1_47/scm-view&sort.png


And with VSCode 1.64 (Jan. 2022), this sort order will be persistent.

See issue 120271 / PR 123232 and commit 9152469

  • Add scm view default sort setting.
  • Add scm view sort to workspace storage.

The options are:

  • Sort the repository changes by path
  • Sort the repository changes by file name
  • Sort the repository changes by SCM status