我有一个Github仓库,其中有一个文件夹我没有意识到要提交。我从本地Git仓库中删除了该文件夹,但是当我推送本地仓库时,所有新的更改都被推送了,但该文件夹仍然存在于我的远程仓库中。如何从Github删除这个文件夹?
根据评论者的建议,您可以使用git rm作为提交的一部分删除文件夹。具体而言,git checkout <branch name> git pull git rm -rf <folder name> git commit -m "<commit message>" git push origin <branch name>
git rm -rf folder && git commit && git push
。 - phdgit commit -a && git push
。 - phd.gitignore
文件中。 - Rupesh