본문 바로가기
The Information Manager From Hell

[Redirecting git submodules]

by cocacola0 2022. 11. 12.

Reference
Git submodules commands

Problem

  • Submodule is connected to original repos.
  • While using opensource packages as submodules in my main project, made several changes to submodules.
  • Commit & Push will be submitted to original repos submodules.

Solution

  • fork the original opensource packages to your own git
  • redirect those submodules url to forked repo
    1. git remote set-url origin "https://github.com/{address of github}/{}.git
    2. edit .gitmodules file in main project

Before

# .gitmodules
[submodule "FiD"]
    path = FiD
    url = https://github.com/facebookresearch/FiD.git

After

# .gitmodules
[submodule "FiD"]
    path = FiD
    url = https://github.com/{your path}/FiD.git

'The Information Manager From Hell' 카테고리의 다른 글

[Git Tags]  (0) 2022.11.14
[Git configuration on Server]  (0) 2022.11.13

댓글