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

24 lines
883 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
summary:
CSS: table-100.css
documentclass: extarticle
monofont: Pragmata Pro
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
git submodule update --init --recursive --remote
```