我知道如果我想忽略我不想推送到Github的文件夹.我可以.gitignore用来忽略它.
现在我的情况是我把文件夹推到了Github,现在我希望我可以忽略它并在Github上删除它,但仍然想要本地文件夹.
我怎么能实现它?
JB *_*zet 11
似乎git rm的--cached选项就是你想要的.
git rm --cached fileToDelete
git commit master
git push origin master
Now add the file to .gitignore
Run Code Online (Sandbox Code Playgroud)
虽然没有测试过.
| 归档时间: |
|
| 查看次数: |
2347 次 |
| 最近记录: |