기타
git repository 합치기
silver18
2021. 3. 23. 15:03
total_repo와 test_repo를 합칠 경우
local에서 둘의 위치
C:\total_repo
C:\test_repo
total_repo에서
$ git remote add test ../test_repo
$ git fetch test
$ git merge --allow-unrelated-histories test/master //ex)master, dev, 줄2에 뜬 branch
$ git remote remove test
$ git add . //?
$ git commit -m "Merge server project into original-project" //?
$ git push
[Git] 여러 저장소를 단일 저장소로 병합하기(합치기)
따로 관리하던 프로젝트를 병합해야 하는 상황이 발생했다. git merge --allow-unrelated-histories 옵션을 통해 비교적 간단히 이 작업을 수행할 수 있다. 합쳐진 단일 프로젝트에서 기존의 다수 프로젝트
yh0921k.tistory.com