我改变了我当地的git repo路径并继续在我的终端中获取未跟踪的文件.所以我不幸地继续使用git clean -d -f,并且在更高的目录中删除了大量的文件,有没有办法可以检索它们:
hamed [] :> git status
On branch master
Initial commit
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: .CFUserTextEncoding
new file: DBC/phase-0-unit-1
new file: DBC/salehrastani.github.io
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: DBC/phase-0-unit-1 (new commits)
modified: DBC/salehrastani.github.io (new commits)
Untracked files:
(use "git add <file>..." to include in what will be committed)
.config/
.cups/
.dvdcss/
.gem/
.npm/
.rbenv/
.ssh/
.subversion/
Desktop/
Documents/
Downloads/
Library/
Movies/
Music/
Pictures/
...
Run Code Online (Sandbox Code Playgroud)
谢谢...
很不幸的是,不行.不是Git.
您已经在主目录中初始化了一个Git存储库,然后告诉Git删除那里所有未跟踪的文件.如果该命令不是在Git存储库中调用的,那么它将拒绝继续,但事实并非如此.
所以,现在是时候看看你是否有备份.