I've met this problem for so many times and let me write a blog for solving this problem.

First, you have a repository called repo1 for example, and want to merge the repo2 to repo1 locally.What should we do for it ?

here's the command:

cd path/to/repo2

git remote add repo1 path/to/repo1

git fetch repo1

git merge repo1/master # or whichever branch you want to merge

git remote remove repo1

Git merge local repository的更多相关文章

  1. git rebase vs git merge详解

    https://medium.com/@porteneuve/getting-solid-at-git-rebase-vs-merge-4fa1a48c53aa#.std3ddz0g 请参考另外一篇文 ...

  2. git merge 合并分支

    git merge 用来做分支合并,将其他分支中的内容合并到当前分支中.比如分支结构如下: master / C0 ---- C1 ---- C2 ---- C4 \ C3 ---- C5 \ iss ...

  3. git merge简介【转】

    转自:http://blog.csdn.net/hudashi/article/details/7664382 git merge的基本用法为把一个分支或或某个commit的修改合并现在的分支上.我们 ...

  4. git merge 到 非当前 branch

    1. Add a remote alias for your local repository, ex: git remote add self file:///path/to/your/reposi ...

  5. git merge简介(转)

    git merge的基本用法为把一个分支或或某个commit的修改合并现在的分支上.我们可以运行git merge -h和git merge --help查看其命令,后者会直接转到一个网页(git的帮 ...

  6. git merge简介

    git merge的基本用法为把一个分支或或某个commit的修改合并到现在的分支上.我们可以运行git merge -h和git merge --help查看其命令,后者会直接转到一个网页(git的 ...

  7. Gitlab+Jenkins学习之路(五)之git merge和git rebase的区别

    命令行测试 [root@linux-node1 ~]# mkdir testing [root@linux-node1 ~]# [root@linux-node1 ~]# cd testing/ [r ...

  8. 撤销 git merge

    由于太多人问怎么撤销 merge 了,于是 git 官方出了这份教程,表示在 git 现有的思想体系下怎么达到撤销 merge 的目标. 方法一,reset 到 merge 前的版本,然后再重做接下来 ...

  9. git pull和git merge区别&&Git冲突:commit your changes or stash them before you can merge. 解决办法

    http://blog.csdn.net/sidely/article/details/40143441 原文: http://www.tech126.com/git-fetch-pull/ Git中 ...

随机推荐

  1. asp.net MVC Razor 语法(3)

    编程逻辑:执行基于条件的代码. If 条件 C# 允许您执行基于条件的代码. 如需测试某个条件,您可以使用 if 语句.if 语句会基于您的测试来返回 true 或 false: if 语句启动代码块 ...

  2. cron 定时任务

    cron 是linux下的定时任务: M H D m d cmd.  这是一种cron文件格式.   M: 分钟(0-59). H:小时(0-23). D:天(1-31). m: 月(1-12). d ...

  3. 我的学习笔记之API-Guides翻译------AppComponent_Activites

    10.26第一天开始:贵在坚持,边看遍整理 一个应用程序通常由多个Activity组成,它们之间是松耦合的关系.特别的,有一个Activity作为app的主Activity,当app首次启动时呈现给用 ...

  4. python 格式化日期

    #!/usr/bin/env pythonimport sysimport reimport datetime dd = '2014-08-10'da = datetime.datetime.strp ...

  5. js处理json的方法

    var json = "{id:"myid", url:"http://www.myurl.com"}"; var js= (new Fun ...

  6. smarty函数-转载

    Smarty常用函数 2009-08-13 14:05:55|  分类: Php |举报 |字号 订阅   1 .include_once语句: 引用文件路径,路径必需正确.   eg:include ...

  7. discuz_style_default.xml 修改

    <?xml version="1.0" encoding="ISO-8859-1"?> <root> <item id=" ...

  8. Mac使用技巧

    外接显示器的生活,在 系统偏好设置--显示器--排列中,点击那个白色的条,可以设置主显示器.

  9. Android UI--ViewPager扩展Tab标签指示

    Android UI--ViewPager扩展Tab标签指示 2013年8月30日出来冒冒泡 ViewPager这个控件已经不算是陌生的了,各种玩Android的小伙伴们都有发表相应的文章来讲它.我看 ...

  10. 什么是epoll

    什么是epoll epoll是什么?按照man手册的说法:是为处理大批量句柄而作了改进的poll.当然,这不是2.6内核才有的,它是在2.5.44内核中被引进的(epoll(4) is a new A ...