我对 git 完全陌生。我在 Mac 终端工作。
每当我git status
在我的主目录中执行操作时,都会出现所有未跟踪的文件、阶段目录中的文件以及我整个主目录中的已提交文件。当我git log
在我的主目录中执行 a 时,出现以下错误:
致命:错误的默认修订版“头”
我该如何纠正这个错误?如何让 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