zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    Python3 调用 Ansible2.x API
    Django——form组件和ModelForm
    Python super().__init__()测试及理解
    ORACLE迁移记录
    CentOS7安装zabbix5.0
    ORACLE LINUX 7.7 安装ORACLE 11.2.0.4.0 RAC
    Spring
    【Git】clone项目&push项目没反应,Cloning into...没下载
    样式不显示,静态资源路径错误
    日常Java练习题
  • 原文地址:https://www.cnblogs.com/lindexi/p/12086610.html
Copyright © 2011-2022 走看看