天天看點

報錯解決:your local changes to the following files would be overwritten by merge: .idea/workspa

背景:

一開始剛建立完項目後,我們會将項目代碼交由

Git

來托管,但是很多小夥伴還沒有建立好

.gitignore

檔案就送出到遠端倉庫了,然後你下次突然記起來了,想要加上

.gitignore

檔案,但是,因為之前已經送出過了,是以你即使現在加上了,東西還會在遠端的。

error: Your local changes to the following files would be overwritten by merge:
        .idea/workspace.xml
           
git rm -r --cached .idea