添加后git仍然未被追踪 [英] git still untracked after add

查看:375
本文介绍了添加后git仍然未被追踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Everytime I do git status there is this folder that appears as untracked.

每次我执行git status时,都会有这个文件夹显示为untracked。分支大师
#未记录文件:
#(使用git add< file> ...来包含将要提交的内容)

#src / error /
没有添加任何内容,但未跟踪的文件存在(使用git add跟踪)

$ 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不报告任何错误。这里有什么问题?

Even after doing git add ., git commit -a the folder at src/error keeps showing up as untracked. Other unstaged files get commited everytime only this folder keeps giving problems. Also git doesnt report any errors. What could be the problem here ?

推荐答案

我发现问题和解决方案是发生了什么事情:

I found the problem and the solution this is what happened:

首先src / error被称为src / Error,当我在本地更改文件夹名称时,文件夹名称被更改,但在git中它仍然作为src / Error提交。 Windows是不区分大小写的,所以我所做的就是删除文件夹提交,并用右边的外壳重新添加。

First src/error was called src/Error when i changed the case locally the foldername was changed but in git it was still commited as src/Error. Windows is case-insensitive so what i did was remove the folder commit and add it again with the right casing.

这篇关于添加后git仍然未被追踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆