How do I manage conflicts with git submodules?

前端 未结 8 965
死守一世寂寞
死守一世寂寞 2020-11-30 20:29

I have a git superproject that references several submodules and I am trying to lock down a workflow for the rest of the my project members to work within.

For this

相关标签:
8条回答
  • 2020-11-30 20:47

    Well In my parent directory I see:

    $ git status
    On branch master
    Your branch is up-to-date with 'origin/master'.
    Unmerged paths:
    (use "git reset HEAD <file>..." to unstage)
    (use "git add <file>..." to mark resolution)
    

    So I just did this

    git reset HEAD linux
    
    0 讨论(0)
  • 2020-11-30 20:52

    First, find the hash you want to your submodule to reference. then run

    ~/supery/subby $ git co hashpointerhere
    ~/supery/subby $ cd ../
    ~/supery $ git add subby
    ~/supery $ git commit -m 'updated subby reference'
    

    that has worked for me to get my submodule to the correct hash reference and continue on with my work without getting any further conflicts.

    0 讨论(0)
提交回复
热议问题