简体   繁体   中英

Git - How to remove one of two folders with the same name in remote repo

I have a repository on github with two folders with the same name but different content. I would like to remove one of these folders. The problem is that if I list the data in the repo locally, there is only one folder (with the content I would like to keep).

Obviously something went wrong in an earlier commit.

Any ideas how I remove one of these folder without removing the other?

is that if I list the data in the repo locally, there is only one folder (with the content I would like to keep).

Then it is possible that a git status shows you the second one, deleted.
Or that your OS was not able to load it, because it is case insensitive

Register that deletion to the index, commit and push:

git rm --cached -r secondFolder/
git add -A .
git commit -m "delete folder"
git push

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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