gitlab仓库迁移到github

Git/版本控制
621
0
0
2022-11-17

gitlab仓库迁移到github

1.克隆仓库到本地

    git clone 被迁移的仓库地址

2.如果需要克隆指定的commitid对应的代码仓库(不需要请忽略这一步)

查看对应的commit的日志 选择回退的版本id

    git log

根据版本id回退(commitid为对应的id)

    git reset --hard <commitid>

3.提交同步.git 文件 (请先在github上创建对应的迁移仓库)

    cd 克隆过的仓库地址
    cd .git
    git push --mirror 迁移的仓库地址