zoukankan      html  css  js  c++  java
  • Gitlab迁移

    公司GitLab项目迁移,

    改  .git/config 里面的地址就行。多分支的还需要一个一个checkout下来。

    [core]
            repositoryformatversion = 0
            filemode = true
            bare = false
            logallrefupdates = true
    [remote "origin"]
            url = http://gitlab.xyz.com/app/app.git
            fetch = +refs/heads/*:refs/remotes/origin/*
    [branch "master"]
            remote = origin
            merge = refs/heads/master
    [branch "xxx"]
            remote = xxx
            merge = refs/heads/xxx
    [branch "yyy"]
            remote = origin
            merge = refs/heads/yyy

    代码还可以提到到多个仓库:

    [remote "web"] 
    url = ssh://server.example.org/home/ams/website.git 
    url = ssh://other.exaple.org/home/foo/website.git

    另外可以看到我们push的时候是这样的:

    git push origin master

    orgin:指的就是上面的 remote "origin"
    master:是指的当前分支

    比如要提交xxx分支
    git push origin xxx

    所以如果在上面配置origin2,定义为另外一个地址,估计也是可以的。
    git push origin2 xxx
    
    
  • 相关阅读:
    大神的文章
    分布式锁
    分布式事务
    事务两三事
    spring框架笔记
    三个缓存数据库Redis、Memcache、MongoDB
    面向对象面试题
    SSM面试
    单例模式
    Spring Cloud面试题
  • 原文地址:https://www.cnblogs.com/thinkCoding/p/6344270.html
Copyright © 2011-2022 走看看