• Semi-Hemi-Lemmygod@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    22 hours ago

    That’s not a very good dialog box. He didn’t make any changes, so discarding them doesn’t sound like a problem.

    There should be a notice when you enable source control that this will permanently delete all existing files with a checkbox (checked by default) that says “Add existing files to source control.”

    • Pyro@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      21 hours ago

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

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

      • LordPassionFruit@lemm.ee
        link
        fedilink
        arrow-up
        0
        ·
        20 hours ago

        My sibling ran into this issue once. I’m not sure if it’s a setting or a default, but vscode would assume they were working in a blank repo until they made a commit.

        Sounds like this person had the project (without source control) in another IDE, tried out VSCode, and it assumed that it was all ‘changes’. I don’t use VSCode, do I can’t say for certain, but I know my sibling lost ~4 hours of project set up for the same reason (though they immediately realized it was their fault).

        • Pyro@programming.dev
          link
          fedilink
          arrow-up
          0
          ·
          20 hours ago

          Reading your comment and #32459, I realize that VSCode source control did have some major issues back then.

          It looks like they have improved though, as the latest VSCode I use doesn’t auto-initialize repositories anymore.