![]() Regardless, a hard reset works on the command line but not with JGit. If the Git configuration variable clean.requireForce is not set to false, git clean will refuse to delete files or directories unless given -f, -n or -i. Submodules are very static and only track specific commits. Somehow the repository gets into a state where git status sees all files as deleted, but all files are still actually present on disk. git stash pop // manually resolve conflicts and save the files (NB: dont use git add ) git restore -staged. A git submodule is a record within a host git repository that points to a specific commit in another external repository. overlay, -no-overlay In overlay mode, the command never removes files when restoring. errors.CheckoutConflictException: Checkout conflict with file: Cannot delete file: vendor/LIBRARYĪt .ResetCommand.checkoutIndex(ResetCommand.java:388)Īt .ResetCommand.call(ResetCommand.java:203)Ĭaused by: .CheckoutConflictException: Checkout conflict with file: Cannot delete file: vendor/LIBRARYĪt .DirCacheCheckout.cleanUpConflicts(DirCacheCheckout.java:1031)Īt .DirCacheCheckout.doCheckout(DirCacheCheckout.java:416)Īt .DirCacheCheckout.checkout(DirCacheCheckout.java:396)Īt .ResetCommand.checkoutIndex(ResetCommand.java:386)Īs far as how the repository got into this state in the first place, I haven't been able to track down. Just like git-checkout(1), this will detach HEAD of the submodule. Initialize the submodules recorded in the index (which were added and committed elsewhere) by setting in. Then, in the cleanUpConflicts method it tries to delete the directory, which fails because the directory is not empty. i get: error: pathspec 'deinit' did not match any. It may not work if we just run git reset -hard, in this case, we can run the git submodule command to reset the submodule to its checkout state. What about 1.) submodule deinit 2.) delete all pasted data 3.) git submodule init 4.) git submodule update. Downloading and pasting data should never be necessary, probably something went wrong there. ![]() ![]() Digging through the code, JGit is seeing a checkout conflict on a directory that is a submodule. So you deleted first the submodule directory and later even the submodule repo (object store). When trying to perform a hard reset through JGit, it is failing with a CheckoutConflictException. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |