dsp-site/wiki/Prog/Git/Git замена адреса подмодуля.md
2019-04-26 11:23:35 +03:00

21 lines
865 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "Git: замена адреса подмодуля"
category: Программирование
tags: программирование, git,
monofontoptions:
- Scale=0.7
...
Если у подмодуля, находящегося в каталоге `thirdparty/example` нужно
заменить адрес синхронизации и имя используемой ветки, то в каталоге
с файлом `.gitmodules`, в котором содержится информация об этом подмодуле,
нужно выполнить команды:
```sh
git config --file=.gitmodules submodule.thirdparty/example.url https://github.com/username/ABC.git
git config --file=.gitmodules submodule.thirdparty/example.branch new-branch-name
git submodule sync --recursive
git submodule update --init --recursive --remote
```