git加了.gitignore文件不生效

1.場景 有時候咱們新建一個項目,直接push到github,可是忘記加.gitignore文件,而後去別的項目複製一個過來,再次上傳,發現仍是把像.idea等原本會被.gitignore排除的文件add進暫存區了。git 2.使用 git rm -r --cached . git add . git commit -m 「修改信息」 git push -u origin mastergithub
相關文章
相關標籤/搜索