我改变了我的本地路径以获得我的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/
Coding Practice/
Desktop/
Documents/
Downloads/
Library/
Movies/
Music/
Pictures/
Public/
Ruby/
Ruby_script/
dotfiles/
event_manager/
learn_ruby/
practice-problems/
temp/
test/
hamed [] :> git clean -f -d
Removing .Trash/
Removing .config/
Removing .cups/
Removing .dvdcss/
Removing .gem/
Removing .npm/
Removing .rbenv/
Removing .ssh/
Removing .subversion/
Removing Applications/
Removing Coding Practice/
Skipping repository Desktop/test
Removing Desktop/.DS_Store
Removing Desktop/.localized
Removing Desktop/1. Main
Removing Desktop/13 - 14 FreshwaterRegs.pdf
Removing Desktop/2. Sub-main
Removing Desktop/2007_truckee_river_rec_map.pdf
Removing Desktop/3. Trance
Removing Desktop/Apress Beginning Ruby From Novice to Professional 2nd Edition Jul 2009.pdf
Removing Desktop/Change of Address.pdf
Removing Desktop/College Assignments
Removing Desktop/Command_Line_Directory.docx
Removing Desktop/covered cal confirmation number.png
Removing Desktop/Devbootcamp Submission.pdf
Removing Desktop/direct payment plan confirmation.png
Removing Desktop/ex12.txt
Removing Desktop/Food Stamp
Removing Desktop/General education
Removing Desktop/Git Cheatsheet.pdf
Removing Desktop/Learn to Program, 2nd Edition-2.pdf
Removing Desktop/plain text.txt
Removing Desktop/Practical Object Oriented Design in Ruby.pdf
Removing Desktop/Pro Git.pdf
Removing Desktop/Proof of Domiscile
Removing Desktop/Reflection on Git and Github.docx
Removing Desktop/sacramento-river-middle-redding-map.png
Removing Desktop/salmon run.pdf
Removing Desktop/SalmonViewingMap2013.pdf
Removing Desktop/san-francisco-bay-map.png
Removing Desktop/Screen Shot 2014-10-27 at 12.33.21 AM.png
Removing Desktop/The Well Grounded Rubyist.pdf
Removing Desktop/Thinking About Time Reflection.docx
Removing Desktop/Wells Fargo Credit Score.pdf
谢谢...
答案 0 :(得分:5)
不幸的是,没有。不是Git。
您已在主目录中初始化了一个Git存储库,然后告诉Git删除所有未跟踪的文件。如果该命令不在Git存储库中调用,它将拒绝继续,但情况并非如此。
所以,现在是时候看看你是否有备份。