zoukankan      html  css  js  c++  java
  • GIT实践:合并本地仓库与远程仓库

    GIT实践:合并本地仓库与远程仓库

    情景描述

      我们要做的是将毫无关联的本地仓库与远程仓库进行合并。

    合并仓库

    1、新增远程仓库地址

      本地仓库,首先需要添加远程仓库地址

    git remote add origin https://gitee.com/mrsaber/leetcode.git

    2、关联远程分支

       创建本地开发分支:

    git checkout -b develop
    

      关联远程分支:

    git branch --set-upstream-to=origin/develop develop

    3、PULL远程仓库代码

      因为两个仓库毫无关联,所以在PULL的时候需要增加参数 -- allow-unrelated-histories ,否则会报错。

      

    4、提交本地代码并PUSH

      到这里就是常规操作了,整个业务流程还是比较清晰的。

    git add .
    git commit -m hello,world
    git push
  • 相关阅读:
    初识MySQL
    正则表达式
    多线程
    多进程
    Python基础--模块
    Python基础--异常
    Python基础--面向对象
    Python基础--文件操作
    Python基础--函数
    python3 日期时间差计算
  • 原文地址:https://www.cnblogs.com/MrSaver/p/12127996.html
Copyright © 2011-2022 走看看