标签:bsp merge 项目 case ide 建立 过程 efs att
使用场景:
有两种配置方式,直接看配置文件
1 [core] 2 repositoryformatversion = 0 3 filemode = false 4 bare = false 5 logallrefupdates = true 6 symlinks = false 7 ignorecase = true 8 hideDotFiles = dotGitOnly 9 [remote "origin"] 10 url = ssh://github仓库地址 11 url = http://gitlab仓库地址 12 fetch = +refs/heads/*:refs/remotes/origin/* 13 [branch "master"] 14 remote = origin 15 merge = refs/heads/master
2.修改项目.git文件下的config文件(提交到两个仓库的不同分支)
1 [core]
2 repositoryformatversion = 0
3 filemode = false
4 bare = false
5 logallrefupdates = true
6 symlinks = false
7 ignorecase = true
8 hideDotFiles = dotGitOnly
9 [remote "origin"]
10 url = ssh://github仓库地址
11 fetch = +refs/heads/*:refs/remotes/origin/*
12 [remote "mirror"]
13 url = http://gitlab仓库地址
14 fetch = +refs/heads/*:refs/remotes/origin/*
15 [branch "master"]
16 remote = origin
17 remote = mirror
18 merge = refs/heads/master
用这种方法需要推送2次
git push origin
git push mirror
在没有特别要求时第一种配置方式更简洁。前提是在备份仓库建立同名的分支。
标签:bsp merge 项目 case ide 建立 过程 efs att
原文地址:https://www.cnblogs.com/shiweida/p/8794249.html