DEV Community

Sospeter Mong'are
Sospeter Mong'are

Posted on

Remove the incorrect submodule addition

If you haven't pushed the changes yet, you can simply undo the submodule addition by running the following steps:

  1. Remove the incorrect submodule addition:

Since you haven't committed or pushed yet, you can run:

   git submodule deinit -f admin-panel
   git rm -f admin-panel
Enter fullscreen mode Exit fullscreen mode
  1. Commit the removal:

After that, stage and commit the removal:

   git commit -m "Removed incorrect admin panel submodule"
Enter fullscreen mode Exit fullscreen mode
  1. Proceed to add the correct submodule:

Now, you can add the correct submodule with the right URL:

   git submodule add https://github.com/your-organization/laravel-admin-panel.git admin-panel
   git commit -m "Added correct admin panel submodule"
Enter fullscreen mode Exit fullscreen mode

This will revert the change without needing to push or do anything further.

Top comments (0)