I accidentally checked in a wrong submodule update: ( as part of a bigger commit )
-Subproject commit 025ffc
+Subproject commit f59250
It is already pushed to the remote..
How do I undo this update?
A git submodule update will bring the latest commits into your local Git worktree. In this git submodule update example, we'll show you how branches can seem out of sync between your submodule and the latest commit, and how to issue the appropriate git command to update those git submodules with the latest code.
Run git checkout 025ffc
in the submodule directory and then git add SubmoduleName; git commit -m 'Some message'
in the main directory.
(Remember that checking out a commit through its hash leaves you in "detached HEAD state", meaning that you're not on any branch. So if there already is a branch pointing to 025ffc
in the submodule repository, you should check out that branch; otherwise, you'll probably want to create a branch there and check it out.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With