git still shows files as modified after adding to .gitignore

前端 未结 5 2318
闹比i
闹比i 2020-12-12 09:27

i\'m adding this to .gitignore file

.idea/*

but anyway the status is:

#       modified:   .gitignore
#             


        
5条回答
  •  旧时难觅i
    2020-12-12 09:43

    Simply add git rm -r --cached

    Sometimes, you update the .gitignore file after the commit command of files. So, the files get cached in the memory. To remove the cached files, use the above command.

提交回复
热议问题