Merge two git repositories of same project

前端 未结 2 1239
谎友^
谎友^ 2021-01-05 05:48

I am currently the only developer working on a project I took over from my predecessor. When I took over the project, it was not under source control. So I created a new git

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-05 06:47

    You may try to add old repository as remote repository at your new repository then pull changes to merge, assuming your repositories will be the baseline.

    $> git remote add old /path/to/other/gitrepo/.git
    
    # if you want to merge their master branch then pull from it
    #   otherwise specify the correct branch to merge
    $> git pull old master
    

提交回复
热议问题