• gitolite migration to bitbucket


    https://gist.github.com/kostajh/9249937

    https://designhammer.com/blog/easily-migrate-git-repositories-bitbucket

    #!/bin/bash
    
    # Usage: ./bitbucket-migrate.sh repos.txt
    #
    # repos.txt should have one repository per line.
    
    echo "Reading $1"
    
    while read line
    do
            repo=$line
            echo "###"
            echo "Processing $repo"
            git clone --bare git@git.designhammer.net:$repo
            cd $repo.git
            echo "Creating repo in Bitbucket"
            curl --user USER:PASSWORD https://api.bitbucket.org/1.0/repositories/ --data name=$repo --data is_private=true --data owner=designhammer
            echo "Pushing mirror to bitbucket"
            git push --mirror git@bitbucket.org:designhammer/$repo.git
            cd ..
            echo "Removing $repo.git"
            rm -rf "$repo.git"
            echo "Waiting 5 seconds"
            echo "###"
            sleep 5;
    done < $1
    
    exit

    https://www.jianshu.com/p/08b7048ec925

    另外说一下迁移aaa的做法。第一步:
    
    git clone git-server:java/bbb/aaa.git --bare 
    
    (增加--bare参数。把所有git内容全部clone,俗称克隆裸库)。 
    
    这时候本地生成的路径是aaa.git,也包含 .git
    
    修改mbank.git目录下面的config文件。修改仓库地址,修改url为:
    
    url= bitbucket-server:AAA/aaa.git
    
    再在aaa.git下面执行
    
    git push --all

     

  • 相关阅读:
    客户主数据批导
    update module (更新模块)
    关于SAP的编码范围
    MV45AOZZ 销售订单增强点
    BAPI list
    sap crm 常用表
    ME01 创建货源清单
    SAP采购寄售业务操作步骤
    让APK 成功在 Windows 运行并可以设置本地文件
    FastAdmin 学习线路 (2018-06-09 更新)
  • 原文地址:https://www.cnblogs.com/stono/p/10395219.html
Copyright © 2020-2023  润新知