Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Reset submodule to checkout state in git

Sometimes there would be a submodule or some submodules within one git repository, in some cases the submodule may be out of sync with the checkout state as some files in submodule may be changed unexpectedly. How to reset the submodule to be the same as the original checkout state?Let's take an example that we have a git repository A and there is a submodule called ruby-gems under it. Assuming the submodule at remote origin has commit a.And on our local environment, the repository A has a latest commit of the submodule which causes some diff difference.$ git diffdiff --git a/web-api/ruby-gems...

18,845 0       GIT SUBMODULE GIT RESET