Recently doing a project, because the pre-folder name is in Chinese, as follows:
|---Repository|---React single-page music playerand git push to GitHub. later in the local folder rename changed to English name:|---Repository|---React SPA Music Playerthen commit,push to GitHub, and suddenly found that the directory structure is not correct:|---Repository|---React single-page music player|---React SPA Music PlayerThere are two directories, rename before the directory actually exists. (a face is crazy. jpg)later Niang, from the net division (netizens are teachers AH) got the solution, the implementation of the perfect solution to the problem, mark:$ git rm-husage: git rm [< options;] [--] < file;-N,--dry-run drills- Q,--quiet does not list deleted files--cached only removed from the index area-F,--force ignore file update status check- R allows recursive deletion--ignore-unmatch exits with zero status even if there is no match
History of my Operation:
1 RM -R--cached "React Edition single-page music player "2 " Remove new Gitignore directory"3 git push Origin master
then look at the directory structure of the GitHub repository:|---Repository|---React SPA Music Player
Feel the world is finally clean.
Delete a folder in the GitHub repository