ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • GitLab에서 GitHub로 Repository 옮기기
    잡동사니 2021. 4. 11. 01:23

    1. GitHub에 접속해 Repository를 하나 만들어준다.

     

    2. VS Code를 킨다.

     

    3. GitLab에서 bare 상태로 자신의 Repository clone 해오기

    git clone --mirror https://kdt-gitlab.elice.io/001_part2_project-portfolio/team2/skidmarker.git

    4. 프로젝트 폴더로 이동하기

    cd skidmarker.git

    5. 새 GitHub Repository에 remote 연결

    git remote set-url --push origin https://github.com/makeitmin/skidmarker.git

    6. 새 GitHub Repository로 push 하기

    git push --no-verify --mirror https://github.com/makeitmin/skidmarker.git

     


    2021.04.21

     

    위 과정보다 더 간단한 코드!

     

     

    1. 터미널을 엽니다.

     

    2. 복사하고자 하는 저장소(gitlab)의 bare clone을 생성합니다.

     git clone --bare https://gitlab.com/exampleuser/old-repository.git

    3. 새로운 저장소(github)로 mirror-push를 진행합니다.

     cd old-repository.git
     git push --mirror https://github.com/exampleuser/new-repository.git

    4. 1번과정에서 클론된 저장소를 지웁니다.

     

     


    특정 브랜치만 옮기기

    git clone -b {branch_name} --single-branch {저장소 URL}

    ex) git clone -b feature/front --single-branch https://kdt-gitlab.elice.io/001-part4-aifashionimage/team4/project-team4.git

    '잡동사니' 카테고리의 다른 글

    노드로 슬랙 챗봇 만들기 + cloudtype 무료 배포  (0) 2023.04.10
    MacOS MongoDB 설치 및 실행  (0) 2021.12.21
    Ubuntu에 react 설치하기  (0) 2021.07.13
    GitLab Template 만들기  (0) 2021.04.11
    VS Code에서 Snippet 사용법  (0) 2021.04.04

    댓글

Designed by Tistory.