How to remove duplicate file tracking in Git

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

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

Src / website / scripts / common.js

SRC / Website / Scripts / common.js

How to remove the second from tracked? This folder is no longer activated because I renamed it from Scripts to Scripts .

+8
git github
source share
1 answer
 git rm --cached /src/Website/Scripts/common.js git commit 

- cached makes git a link to the version state, not to the working tree.

+11
source share

All Articles