Git/源:修订间差异

来自康健生活
< Git
Kangkk​(留言 | 贡献)
创建页面,内容为“== 标题文本 == == 设置多源 ==”
 
Kangkk​(留言 | 贡献)
 
(未显示同一用户的3个中间版本)
第1行: 第1行:
== 标题文本 ==
== 标题文本 ==
== 设置多源 ==
== 设置多源 ==
代码同步到多个仓库时要分别命名 repo, eq:
{{shc|<syntaxhighlight lang="bash">
# 添加第一个远程<github>仓库<wiki.git> 别名:github-repo
git remote add github-repo <github-repo-url>
# 添加第二个远程<coding.net>仓库<wiki.git> 别名:coding-repo
git remote add coding-repo <coding-repo-url>
</syntaxhighlight>|bash|$}}
测试
{{shc|<syntaxhighlight lang="bash">
git remote -v</syntaxhighlight>|bash|$}}
提交代码:
{{shc|<syntaxhighlight lang="bash">
git push github-repo master:feature/v0.0.1 && \\
git push coding-repo master:feature/v0.0.1
</syntaxhighlight>|bash|$}}

2026年11月5日 (四) 19:13的最新版本

标题文本

设置多源

代码同步到多个仓库时要分别命名 repo, eq:

Bash-icon-svgrepo-com.svg
$
# 添加第一个远程<github>仓库<wiki.git> 别名:github-repo
git remote add github-repo <github-repo-url>

# 添加第二个远程<coding.net>仓库<wiki.git> 别名:coding-repo
git remote add coding-repo <coding-repo-url>

测试

Bash-icon-svgrepo-com.svg
$
git remote -v

提交代码:

Bash-icon-svgrepo-com.svg
$
git push github-repo master:feature/v0.0.1 && \\
git push coding-repo master:feature/v0.0.1