我完全不了解git。我正在Mac终端工作。
每当我在主目录中执行git status
时,所有未跟踪的文件、舞台目录中的文件以及整个主目录中已提交的文件都会出现。 当我在主目录中执行git log
时,会出现以下错误:
fatal: bad default revision 'HEAD'
如何纠正此错误? 如何使git停止跟踪我的整个主目录的内容,而不影响其当前状态?
提前致谢,对于我的无知我深感抱歉。 我只是不想做任何可能会对我的主目录造成潜在损害的事情。
当我在主目录中键入git status
时,会得到以下内容:
~ (master) > Kojo$ git status
On branch master
Initial commit
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: Desktop/Classes/Person.cpp
new file: Desktop/Classes/Person.h
new file: Desktop/Classes/Tweeter.cpp
new file: Desktop/Classes/Tweeter.h
new file: Documents/AoGPMidterm/xcode/TriMesh.h
new file: Projects/Testing/Testing/ConditionalClass.cs
new file: Projects/Testing/Testing/Lucky_Num.cs
new file: Projects/Testing/Testing/NewEnum.cs
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
deleted: Desktop/Classes/Person.cpp
deleted: Desktop/Classes/Person.h
deleted: Desktop/Classes/Tweeter.cpp
deleted: Desktop/Classes/Tweeter.h
modified: Documents/AoGPMidterm/xcode/TriMesh.h
modified: Projects/Testing/Testing/Lucky_Num.cs
Untracked files:
(use "git add <file>..." to include in what will be committed)
.3dequalizer/
.Assimilate/
.CFUserTextEncoding
.MacOSX/
.adobe/
.android/
.appletviewer
.bash_git
.bash_history
.bash_profile
.bashrc
.bashrcecho
.bitrock/
.cache/
.codeintel/
.config/
.cptzzscn
git status
的输出结果。 - user456814git status
时,这是我得到的输出: - Kojo Opuni