好了还是回到问题,我想把两个git合并
首先用git bash 到我的一个仓库,作为需要合并的仓库
cd 仓库
添加我要合并仓库
# git remote add 仓库 仓库可以是远程仓库
git remote add lindexi git@github.com:lindexi/lindexi.github.io.git
从远程仓库下载,这时我们弄个新的
git branch lindexi
git checkout lindexi
git fetch lindexi
git merge lindexi/master
解决冲突
git add .
git commit -m "合并"
git push lindexi lindexi:master
git 我有两个仓库,一个是gitbook在写一本UWP入门,一个是放在github的垃圾,这个是我想要开个人网站,但是做的还是不行[https://github.com/lindexi/lindexi.github.io结果发现我需要做html,本来的文件没法直接转过去,但是我又不想使用第三方工具,于是最后我想着自己来写一个,于是就做了winMarkdown,win10软件,不过已经几个月没做](https://github.com/lindexi/lindexi.github.io结果发现我需要做html,本来的文件没法直接转过去,但是我又不想使用第三方工具,于是最后我想着自己来写一个,于是就做了winMarkdown,win10软件,不过已经几个月没做 )
好了还是回到问题,我想把两个git合并
<!--more-->
<div id="toc"></div>
首先用git bash 到我的一个仓库,作为需要合并的仓库
```csharp
cd 仓库
添加我要合并仓库
# git remote add 仓库 仓库可以是远程仓库
git remote add lindexi git@github.com:lindexi/lindexi.github.io.git
从远程仓库下载,这时我们弄个新的
git branch lindexi
git checkout lindexi
git fetch lindexi
git merge lindexi/master
解决冲突
git add .
git commit -m "合并"
git push lindexi lindexi:master
git checkout master
git merge lindexi
git branch -d lindexi
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有