【发布时间】:2011-03-27 16:35:46
【问题描述】:
每次我执行 git status 时,都会有这个文件夹显示为未跟踪。
$ git status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# src/error/
nothing added to commit but untracked files present (use "git add" to track)
即使在执行git add .、git commit -a 之后,src/error 处的文件夹仍然显示为未跟踪。每次只有这个文件夹不断出现问题时,其他未暂存的文件都会被提交。 git也不会报告任何错误。这可能是什么问题?
【问题讨论】:
-
你试过
git add src/error/吗? -
我试过它没有用我在那个文件夹中有一个文件我也尝试直接添加那个文件也没有用。
-
您是否尝试在 src/error 下添加特定文件?你的 .gitignore 文件中有什么?
-
你能告诉我们你运行的命令和它的输出吗?您的 .gitignore 文件的内容也会有所帮助。最佳猜测:尝试在 git add 中使用“-f”标志。
-
对于这个项目,我没有使用 exclude 或 .gitignore 文件。我跑了 $ git add 。 -f -v 我没有得到任何输出。然后我做了 git status ,我得到了与第一条消息相同的输出,告诉我该文件夹未跟踪。
标签: git version-control commit add