CLOVIS
CLOVIS

Reputation: 998

Git submodule: manually change sha1

Simple thing, I have a project with a submodule. At some point a change in the submodule was not pushed, but the superproject was pushed.

Now, the superproject's sha-1 ref to the submodule points to an unexisting commit on the server side, so git cannot update the submodule (error: no such remote ref 8ba0033813718939726d7e9429bf3eabcc52034d)

I simply want to set the sha-1 to some other value -- but since the update fails, I cannot use git checkout ... in the submodule (which is the accepted solution for every question that looks like that on SO).

I tried to explore .git/modules/... but I cannot find where it is stored.

If you want more info about the project's structure, you can find the project here and the submodule here.

Upvotes: 2

Views: 1450

Answers (1)

CLOVIS
CLOVIS

Reputation: 998

Even though git checkout master doesn't work in the submodule, I managed to get git checkout [commit hash] to work -- and it solves the problem.

Upvotes: 2

Related Questions