(Git Error) Git submodule branch 적용불가 문제

Git submodule의 branch 적용은 아래 .gitmodules 파일에서 적용할 수 있습니다.

그러나 적용이 안되는 경우가 있는데 아래 명령어로 강제 적용이 가능합니다.

git config submodule.Captain/Libraries/submodule_name.branch Branchname

submodule_name과 Branchname을 적절하게 수정해야합니다.

git config --get submodule.Captain/Libraries/submodule_name.branch

적용 후 위 명령어를 입력하면 앞서 강제적용한 branch 이름이 출력되어야 합니다. 아무것도 출력되지 않는다면 .git 폴더 내 config파일을 직접 수정해야합니다.

git submodule update --remote

모두 적용되었다면 위 명령어를 통해 submodule을 업데이트 할 수 있고 만약 이 단계에서 적용되지 않는다면 submodule 이 들어있는 Libraries 폴더 내 내용을 모두 지워주면 됩니다.