• subignition@fedia.io
    link
    fedilink
    arrow-up
    11
    arrow-down
    1
    ·
    11 个月前

    It’s changes from the prior commit in the repository, which, if they had not committed anything prior, would have been an empty directory.

    This is perhaps a good lesson in teaching version control as its own concept rather than “streamlining it” by bundling it with an editor.

    • conciselyverbose@sh.itjust.works
      link
      fedilink
      arrow-up
      19
      ·
      11 个月前

      You shouldn’t be taking ownership of files and then deleting them without communication a hell of a lot better than that.

      I understand what happened. I’m saying that if you’re going to delete stuff that was there before the software was, your flow to adding a project should include suggesting a base level commit of everything that’s there already.

      • subignition@fedia.io
        link
        fedilink
        arrow-up
        5
        ·
        11 个月前

        That’s definitely fair, creating a repository in a non-empty directory could definitely suggest auto-committing the current state if it doesn’t already. I don’t use VSCode so I wouldn’t know.

        Although now that I think about it, that could have been the intention here but not automatic, if that’s why 5k+ files were staged without the user explicitly staging them. Extra tragic if that’s the case.

        • T156@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          11 个月前

          Although now that I think about it, that could have been the intention here but not automatic, if that’s why 5k+ files were staged without the user explicitly staging them. Extra tragic if that’s the case.

          From the git discussions around the issue, it wasn’t that the files were automatically staged, but that the “discard all changes” feature invoked a git clean, and also deleted untracked files.

          Since OP’s project wasn’t tracked, it got detonated.

          • WolfLink@sh.itjust.works
            link
            fedilink
            arrow-up
            2
            ·
            11 个月前

            Since OP’s project wasn’t tracked, it got detonated.

            This is the biggest part of the problem. Using git directly, it just ignores files that aren’t tracked.

    • Scubus@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      11 个月前

      Ok then, the changes to the repository shouldve been discarded. Anything he uploaded shouldve been deleted from the server. Why were files on his local machine deleted?

      • subignition@fedia.io
        link
        fedilink
        arrow-up
        3
        ·
        11 个月前

        What makes you think a server was involved here? It was a local repository, evidenced by the reporter’s bewilderment that files can be deleted without going to the Recycle Bin first. Which tells us that in addition to VCS, they were unfamiliar with Windows as well.

        • Scubus@sh.itjust.works
          link
          fedilink
          arrow-up
          3
          ·
          11 个月前

          Admittedly i dont use source control myself as im a hobbiest, but I didnt realize that git was local. As for the recycle bin bit, yeah theyre kinda dumb. Is source control different from git?

          • subignition@fedia.io
            link
            fedilink
            arrow-up
            4
            ·
            11 个月前

            Hobbyist myself so no worries! Git is one example of source control / version control software. You normally have your local working copy of a repository and then a remote where you push your changes when they are finished or to share them with others.

          • WolfLink@sh.itjust.works
            link
            fedilink
            arrow-up
            2
            ·
            edit-2
            11 个月前

            You may be confusing git with GitHub.

            git is a version control tool that lets you keep and manage a history of the files you are editing

            GitHub is a website (not directly affiliated with the group maintaining git) that lets you upload, backup, and share your code using the format used by the git tool.

            source control just refers to software to manage your source code in some form. git is the most popular tool of its kind, but there are others, for example mercurial.