Update a submodule to the latest commit

前端 未结 8 1072
北荒
北荒 2020-12-07 06:54

I have a project A which is a library and it is used in a project B.

Both projects A and B have a separate repository on github BUT inside B we have a submodule of A

8条回答
  •  自闭症患者
    2020-12-07 07:24

    Andy's response worked for me by escaping $path:

    git submodule foreach "(git checkout master; git pull; cd ..; git add \$path; git commit -m 'Submodule Sync')"
    

提交回复
热议问题