简体   繁体   English

如何删除 GitHub 存储库中的特定文件夹?

[英]How to delete a specific folder in a GitHub repository?

I ma beginner in open source and I was committed a wrong file in my GitHub repository, I just want to just delete it and here is a picture and the link..... Screenshot of the image我是开源初学者,我在我的 GitHub 存储库中提交了一个错误文件,我只想删除它,这是一张图片和链接..... 图片截图

Here is the problem I just want to delete in and nothing more. 这是我只想删除的问题,仅此而已。

Link to my repository链接到我的存储库

Considering you have checked out the repo in your workstation.考虑到您已经检查了工作站中的 repo。

Steps:脚步:

  1. Go to the folder in your workstation Go 到工作站中的文件夹
  2. Select & delete the folder/file (if its hidden file then make sure its visible) Select 并删除文件夹/文件(如果其隐藏文件则确保其可见)
  3. git commit & git push git 提交 & git 推送
  4. Done完毕

You can try this step你可以试试这个步骤

git rm -r --cached FolderName 
git commit -m "Removed folder from repository" 
git push origin master

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM