git submodule checks out the same commit

前端 未结 4 1972
一整个雨季
一整个雨季 2021-01-15 05:34

After I git submodule update it always checks out the same commit. for example 34561.

I do git checkout master for submodule a

4条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-15 05:40

    You need to go into the submodule folder and execute:

    git fetch --all --prune
    git pull origin master
    

    And now you will have the latest commit in the submodole.
    Once you run the fetch its updatigng your .git folder under the submodule with the latest commits. It will make sure that you have the recent changes.

提交回复
热议问题