zoukankan      html  css  js  c++  java
  • Make bare repository out of git svn init

    使用git-svn建立一个subversion代码库的git库的操作过程。

    git svn init https://172.19.49.185:3690/svn/AS_BOSS_SVN -T JFZW/trunk/code/cbs repo.tmp --username=l39885
    cat repo.tmp/.git/config | \
    sed 's#:refs/remotes/trunk#:refs/heads/master#' | \
    sed 's#:refs/remotes/\*#:refs/heads/*#' | \
    sed 's#:refs/remotes/tags/\*#:refs/tags/*#' \
    > repo.tmp/.git/config.tmp
    mv repo.tmp/.git/config.tmp repo.tmp/.git/config
    git --git-dir=repo.tmp/.git config --bool core.bare true
    mv repo.tmp/.git repo.git
    # git --git-dir=repo.git svn fetch -r373135
    git --git-dir=repo.git svn fetch
    git --git-dir=repo.git svn gc
    git --git-dir=repo.git gc --aggressive

    然后在另外一台机器上建立一个mirror clone。(备份很重要!)

    git clone --mirror cbs@10.164.129.24:/srv/git/repo.git /srv2/git/repo.git

  • 相关阅读:
    python-字典
    python-列表
    python:基础数据类型
    前端之JS
    数据库之备份,恢复
    前端之CSS
    前端之CSS笔记
    前端之html
    数据库之操作使用python操作mysql数据库
    何为javaBean?
  • 原文地址:https://www.cnblogs.com/luojunqiang/p/2685415.html
Copyright © 2011-2022 走看看