Git deleted my folders

Asked

Viewed 45 times

0

I gave one git status in the repository and this appeared: I don’t know how it happened, but I want the folders back (I never put git add . yet)

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        deleted:    .idea/.gitignore
        deleted:    .idea/inspectionProfiles/profiles_settings.xml
        deleted:    .idea/misc.xml
        deleted:    .idea/modules.xml
        deleted:    .idea/python.iml
        deleted:    .idea/vcs.xml
        deleted:    .vscode/settings.json
        deleted:    README.md
        deleted:    aula01.py
        deleted:    aula02.py
        modified:   aula04.ipynb
        deleted:    datasets/kc_house_data.csv
        deleted:    datasets/mapa_house.html
        deleted:    datasets/mapa_house_aula02.html
        deleted:    datasets/question_aula02.csv
        deleted:    datasets/report_aula02.csv
  • 5

    Good, probably someone deleted the files and now the git is saying that they were deleted... In the message itself has the hint to reverse: use "git Restore <file>..." to discard changes in Working directory - that is, try to rotate git restore arquivos (or git restore . if you want to rescue everyone - remembering that if you do it for "everyone", it will also undo the change of the file that is modified, then maybe it is better to do it only for Deleted)

  • 2

    Did you ever change the folder name, change the directory or anything related? For example, if you rename the folder datasets, the git you will understand that the folder datasets deleted/deleted and a new folder nome-da-copia was created/added. If this case does not fit with yours, I suggest what @hkotsubo mentioned.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.