Git discard all changes 2026.3.4

Resolved

Git discard all changes 2026.3.4

avatar

Hello,

I wanted to discard all changes after testing some pwsh modules.

Clicking the discard all & stop editing button does not seem to work, except showing the confirm prompt and redirecting to admin/git after a few seconds.

No errors in the console, but the logs show this every time I press discard all & stop editing:


2026-10-30 10:49:05.169 +00:00 [ERR][PowerShellUniversal.Configuration.RoleService] Attempted to delete built-in role: API Editor
2026-10-30 10:49:05.172 +00:00 [ERR][PowerShellUniversal.Configuration.RoleService] Attempted to delete built-in role: API Reader
2026-10-30 10:49:05.172 +00:00 [ERR][PowerShellUniversal.Configuration.RoleService] Attempted to delete built-in role: App Editor
2026-10-30 10:49:05.172 +00:00 [ERR][PowerShellUniversal.Configuration.RoleService] Attempted to delete built-in role: App Reader
2026-10-30 10:49:05.172 +00:00 [ERR][PowerShellUniversal.Configuration.RoleService] Attempted to delete built-in role: Script Editor
2026-10-30 10:49:05.173 +00:00 [ERR][PowerShellUniversal.Configuration.RoleService] Attempted to delete built-in role: Script Reader
2026-10-30 10:49:05.173 +00:00 [ERR][PowerShellUniversal.Configuration.RoleService] Attempted to delete built-in role: Portal Editor
2026-10-30 10:49:05.173 +00:00 [ERR][PowerShellUniversal.Configuration.RoleService] Attempted to delete built-in role: Portal Reader
2026-10-30 10:49:05.173 +00:00 [ERR][PowerShellUniversal.Configuration.RoleService] Attempted to delete built-in role: Agent

I do not have any pending changes regarding these roles.

Discarding individual items works as expected.

It's not an immediate issue for me since I can mainly discard, just thought I’d let you know.

Best regards

Dy

All Comments (2)

avatar

Hello Dy,

Thank you for the detailed report and for the screenshots.

The RoleService errors about built-in roles are a known issue (ticket PSU-1507, for internal reference only).

PowerShell Universal logs them when it reloads the full configuration, and the built-in roles are not deleted.

They are not related to your pending changes, so you can ignore them for now.

For the Discard all & stop editing button, your screenshots show that most of the 352 changes are new files, such as the module folders under Modules.

Our working theory is that Discard all reverts changed files but does not remove newly added files.

That would explain why the list looks the same after the redirect.

To help us confirm it, could you check the following after you click Discard all & stop editing?

  • Does the change count stay at exactly 352, or does it go down a little?

  • Are the remaining items all marked A (added), or do some show as modified?

  • Which Git sync mode do you use, and is the external Git client option turned on?

Could you also share the system log lines from the same minute, including the INF lines?

Best regards,

Patrick Ouimet

avatar

Thanks for the fast response!

Good catch, indeed the new files stay, modified once get the rest.

Case closed.