반응형
초기설정
- 여러 레포지토리를 병합할 레포지토리를 만든 뒤 별도의 폴더를 생성하고 깃 클론
# 먼저 해당 위치에 새로운 git 저장소를 생성하기 위해
$ git init
# 위에서 만들었던 새로운 리포지토리 주소를 복사해서 넣어 clone한다.
$ git clone https://github.com/chaehyuenwoo/Itwill_PlayGround.git
Clone 한 Repository에 commit 기록 남기기
$ git add .$ git commit -m 'commit test'
레포지토리 병합
$ git subtree add --prefix=기존리포지토리명 기존리포지토리주소 기존브랜치명
# EX)
$ git subtree add --prefix=Workspace https://github.com/chaehyuenwoo/Spring5.0.git main
새롭게 만든 Repository에 Push
$ git push origin HEAD:main --force
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
레퍼런스
반응형
'Dev Setup' 카테고리의 다른 글
| 윈도우10 실행중인 포트 종료 (0) | 2023.11.30 |
|---|---|
| Git. push한 commit 메세지 수정 (0) | 2023.11.20 |
| AWS EC2 자주 쓰는 명령어 (0) | 2023.11.15 |
| Git. 하나의 PC에서 두개 이상의 깃 계정 사용하기 (1) | 2023.09.18 |
| Windows10 개발환경 구축하기 (0) | 2023.09.18 |
