• 2018-2-13-git-合并两个仓库


    title author date CreateTime categories
    git 合并两个仓库
    lindexi
    2018-2-13 17:23:3 +0800
    2018-2-13 17:23:3 +0800
    git

    好了还是回到问题,我想把两个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软件,不过已经几个月没做
    
    好了还是回到问题,我想把两个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
  • 相关阅读:
    解决 SQL Server Profiler 跟踪[不断]出现检索数据
    Linq表达式开窍
    CSS3——动画效果
    MongoDB学习与BUG解答
    MongoDB 客户端 MongoVue
    Memcached——分布式缓存
    WRONGTYPE Operation against a key holding the wrong kind of value
    Redis——分布式简单使用
    HTML5——播放器
    HTML5——行走日记
  • 原文地址:https://www.cnblogs.com/lindexi/p/12086609.html
Copyright © 2020-2023  润新知