Git commit to common submodule (master branch)

前端 未结 6 1651
南方客
南方客 2020-12-02 04:56

I\'ve two or more projects (let\'s call them ProjectFoo and ProjectBar) having some common code that I put in a submodule

6条回答
  •  臣服心动
    2020-12-02 05:35

    To merge changed from detached HEAD into master, run:

    git rebase HEAD master
    

    then checkout master (use -f for force):

    git checkout master
    

    If you've got multiple submodules to deal with, use: git submodule foreach, e.g.

    git submodule foreach git pull origin master -r
    

提交回复
热议问题