[英]Delete a folder in github, but not in local
I know that if I want to ignore folder that I don't want to push to Github.我知道如果我想忽略不想推送到 Github 的文件夹。 I could use
.gitignore
to ignore it.我可以使用
.gitignore
忽略它。
Now my situation is I had pushed the folder up to Github, now I wish I could ignore it and delete it on Github, but still want the folder in local side.现在我的情况是我已经将文件夹推送到 Github,现在我希望我可以忽略它并在 Github 上删除它,但仍然希望该文件夹在本地。
How could I achieve it?我怎么能做到呢?
In order for you to remove the folder or file from Github but no from you computer use this command in the following order为了让您从Github 中删除文件夹或文件,但没有从您的计算机中删除,请按以下顺序使用此命令
name-of-the-folder
name-of-the-folder
"insert your comment inside this quotation marks"
"insert your comment inside this quotation marks"
in case you have several branches
you can do如果你有几个
branches
你可以做
master
master
branchName
branchName
EXAMPLE例子
git rm -r --cached .vscode
git commit -m "removed the .vscode folder"
git push origin
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.