我的 .gitignore
文件:
.DS_Store
temp
!temp/script.txt
然而,当我执行git status
命令时,它并不显示temp/
目录,也没有显示script.txt
文件未被暂存。它只显示了.gitignore
文件:
# 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: .gitignore
我正在学习git。你有什么想法,我到底哪里错了吗?
.gitignore
来忽略已经被Git版本控制的文件。 - John Szakmeister