Answers for "revert changes git submodule"

0

revert changes git submodule

#If you want to do this for all submodules, without having to change directories, you can perform

git submodule foreach git reset --hard

#You can also use the recursive flag to apply to all submodules:

git submodule foreach --recursive git reset --hard


#OR

git submodule deinit -f .
git submodule update --init

#The first command completely "unbinds" all submodules, the second then makes a fresh checkout of them.
#It takes longer than the other methods, but will work whatever the state of your submodules.
Posted by: Guest on October-24-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language