github to gitlab
2025. 2. 5. 08:23ㆍEnv/Tools
- 목차
반응형
github의 모든 branch, tag 내용을 gitlab에 반영하는 방법
다음은 github의 test라는 repository의 모든 branch, tag들을 gitlab의 your repository로 반영하는 과정을 설명합니다.
우선 github의 test repo를 clone 합니다.
# GitHub 프로젝트 클론
git clone https://github.com/test.git
test로 들어가서 모든 branch 내용을 fetch 하여 local로 가져옵니다.
cd test
# 모든 원격 브랜치와 태그 가져오기 및 로컬 추적
git fetch origin
for remote in $(git branch -r | grep origin/ | grep -v '\->'); do
git branch --track "${remote#origin/}" "$remote";
done
이제 test local repo에 branch와 tag 내용을 반영할 gitlab repo를 remote repo로 등록합니다.
git remote add gitlab https://your.gitlab.com/username/repository.git
등록한 gitlab remote repo에 branch와 tag 내용을 모두 push 합니다.
# GitLab 저장소로 모든 브랜치와 태그 푸시
git push gitlab --all
git push gitlab --tags
반응형
'Env > Tools' 카테고리의 다른 글
gitlab 기본 사용법 (0) | 2025.01.15 |
---|---|
wacom tablet 인식 불가 문제 (0) | 2024.09.28 |
맥에서 자동 대문자 시작 해제 방법 (Sonoma) (0) | 2024.08.17 |
파인더 정렬 방식 설정 (0) | 2024.08.17 |
vscode namespace "std" has no member "string"C/C++(135) 제거 (0) | 2024.08.13 |