Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: unable to rmdir: Directory not empty #520

Open
iegorval opened this issue Nov 7, 2023 · 1 comment
Open

Question: unable to rmdir: Directory not empty #520

iegorval opened this issue Nov 7, 2023 · 1 comment

Comments

@iegorval
Copy link

iegorval commented Nov 7, 2023

I have a local copy of a huge repo and I need to keep only a subfolder of a submodule with the related history. It seemed from all description that git-filter-repo is what should do the trick. I run git-filter-repo --path PATH_TO_SUBFOLDER_TO_KEEP --force.

However, first issue is that I am getting warning: unable to rmdir: Directory not empty for all other submodules that should be deleted. How to force this delete? Or some manual update of the git-filter-repo script with eg. rm -r would be required?

Second issue is that not even at PATH_TO_SUBFOLDER_TO_KEEP I see some changes: all files, except a few files on a top-level module, stay in their places. The unmatched submodule files do not get deleted. Or does git-filter-repo delete only related history, and the files themselves are expected to be kept? Or it has troubles with nested submodules?

UPD git filter-repo --analyze also does not list the paths to any files in the submodules.

@puchongcnxx29
Copy link

I have a local copy of a huge repo and I need to keep only a subfolder of a submodule with the related history. It seemed from all description that git-filter-repo is what should do the trick. I run git-filter-repo --path PATH_TO_SUBFOLDER_TO_KEEP --force.

However, first issue is that I am getting warning: unable to rmdir: Directory not empty for all other submodules that should be deleted. How to force this delete? Or some manual update of the git-filter-repo script with eg. rm -r would be required?

Second issue is that not even at PATH_TO_SUBFOLDER_TO_KEEP I see some changes: all files, except a few files on a top-level module, stay in their places. The unmatched submodule files do not get deleted. Or does git-filter-repo delete only related history, and the files themselves are expected to be kept? Or it has troubles with nested submodules?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants