warning: redirecting to Cloning into '/home/user/git/merge_request-2883/merge_request-2883-submodule-a/merge_request-2883-sub-submodule-b-2'. Submodule 'merge_request-2883-sub-submodule-b-1' () registered for path 'merge_request-2883-submodule-a/merge_request-2883-sub-submodule-b-1' Submodule 'merge_request-2883-sub-submodule-b-2' () registered for path 'merge_request-2883-submodule-a/merge_request-2883-sub-submodule-b-2' Cloning into '/home/user/git/merge_request-2883/merge_request-2883-submodule-a/merge_request-2883-sub-submodule-b-1'. gitignore files I'm fully aware that the likely answer is 'no', and I have seen this SO question that tells me that it is not possible to ignore changes to tracked files. warning: redirecting to Cloning into '/home/user/git/test/merge_request-2883/merge_request-2883-submodule-a/merge_request-2883-sub-submodule-b-2'. Git - How to remove untracked folder in submodules Ask Question Asked 7 years, 6 months ago Modified 7 years, 6 months ago Viewed 4k times 2 I tried checkout and discard this library with git checkout command, but seems it does not work for me. modified: (untracked content) My question is: Is there any way of telling git to ignore these untracked files without fixing the upstream.warning: redirecting to Submodule path 'merge_request-2883-submodule-a': checked out 'aafce850fc665d23e7c2351edf3651df1dfd396e' Submodule 'merge_request-2883-sub-submodule-b-1' () registered for path 'merge_request-2883-submodule-a/merge_request-2883-sub-submodule-b-1' Submodule 'merge_request-2883-sub-submodule-b-2' () registered for path 'merge_request-2883-submodule-a/merge_request-2883-sub-submodule-b-2' Cloning into '/home/user/git/test/merge_request-2883/merge_request-2883-submodule-a/merge_request-2883-sub-submodule-b-1'. Note: gitlab-runner!2883 (merged) MR adds a second git clean -ffxd after step 4 in the original sequence fix the issue gitlab-runner!2351 (closed) According to the gitlab-runner!2351 (comment 403269219) by Steps to reproduce If we had done the clean after the update, this would have been correctly removed. When we do step 4, suddenly that directory that used to be sub-submodule is now some unknown directory that's left behind. When we do step 2, no problem, we're on the earlier commit, and that sub-submodule is tracked and retained. Let's say a submodule itself has a submodule, AND that in the new commit hash, that submodule has been removed. The problem is step 2 happening before step 4. Recursively check out the correct commit in all submodules.Recursively put back any removed, tracked files in the submodules. Recursively remove any untracked files in the submodules.Update all the submodules' URLs, recursively.git submodule sync -recursive git submodule foreach -recursive git clean -ffxd git submodule foreach -recursive git reset -hard git submodule update -init -recursive.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |