开发者

How to remove duplicate file tracking in Git

One of my files is tracked twice after I changed the name of my folder.

Git is now tracking the following two files, which are actually the same file.

src/Website/scripts/common.js

src/Website/Scripts/common.js

How can I remove the second one from be tracked? This folder doesn't excist anymore, because I renamed it from Scripts to 开发者_如何学JAVAscripts.


git rm --cached /src/Website/Scripts/common.js
git commit

--cached makes git refer to the versioned state, rather than the working tree.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜