• 3 Posts
  • 178 Comments
Joined 1 year ago
cake
Cake day: July 26th, 2023

help-circle



  • He wouldn’t have seen the “Discard Changes” button at all if source control wasn’t already setup (and detected by VSCode).

    No sane program will delete files when you initialize source control either.

    As I found later, VSCode did have weird behaviors with source control back then. My experience is more with the latest versions.


  • Pyro@programming.devtoProgrammer Humor@programming.devMicrosoft Please Fix
    link
    fedilink
    arrow-up
    10
    arrow-down
    7
    ·
    edit-2
    15 hours ago

    “Changes” encompass more than you think. Creating / Deleting files are also changes, not just edits to a file.

    • If the change is an edit to a tracked file, “Discard Changes” will reverse the edit.
    • If the change is deleting a tracked file, “Discard Changes” will restore it back.
    • If the change is a new untracked file, “Discard Changes” will remove it as intended.

    It can also be all of them at the same time, which is why VSCode uses “Changes” instead of “Files”.