dsp-site/wiki/Prog/Git/Git замена адреса подмодуля.md
2019-04-19 21:34:58 +03:00

23 lines
859 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.

# Git: замена адреса подмодуля
---
title: "Git: замена адреса подмодуля"
category: Программирование
tags: программирование, git
summary:
CSS: table-100.css
...
Если у подмодуля `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
```