git 저장소를 복제하는 방법은 무엇입니까? (포킹없이)
두 개의 저장소가 있고 첫 번째 저장소와 다른 액세스 수준을 가진 다른 빈 저장소에 하나를 모두 복사해야합니다. 사본과 어머니 저장소를 함께 링크하면 안됩니다.
나는 git을 처음 접했고 누군가가 나를 도울 수 있다면 멋질 것입니다.
참조 https://help.github.com/articles/duplicating-a-repository를
짧은 버전 :
정확히 복제하려면 베어 클론과 미러 푸시를 모두 수행해야합니다.
mkdir foo; cd foo
# move to a scratch dir
git clone --bare https://github.com/exampleuser/old-repository.git
# Make a bare clone of the repository
cd old-repository.git
git push --mirror https://github.com/exampleuser/new-repository.git
# Mirror-push to the new repository
cd ..
rm -rf old-repository.git
# Remove our temporary local repository
참고 : 위의 내용은 모든 원격 git repo에서 잘 작동하며 지침은 github에만 국한되지 않습니다.
위의 내용은 저장소의 새 원격 복사본을 만듭니다. 그런 다음 작업중인 컴퓨터에 복제합니다.
git-copy를 사용할 수도 있습니다 .
Gem과 함께 설치하고,
gem install git-copy
그때
git copy https://github.com/exampleuser/old-repository.git \
https://github.com/exampleuser/new-repository.git
GitHub에 복사하는 경우 GitHub Importer 를 사용하여 이를 수행 할 수 있습니다. 원래 repo는 다른 버전 제어 시스템에서도 가능합니다.
기존 파일의 전부 또는 대부분을 사용하여 새 저장소를 만들고 싶다면 (즉, 일종의 템플릿으로) 가장 쉬운 방법은 원하는 이름 등으로 새 저장소를 만들고 복제하는 것입니다. 바탕 화면에 원하는 파일과 폴더를 추가하기 만하면됩니다.
모든 역사 등을 얻지는 못하지만이 경우에는 원하지 않을 것입니다.
터미널을 엽니 다.
저장소의 베어 복제본을 만듭니다.
git clone --bare https://github.com/exampleuser/old-repository.git
Mirror-push to the new repository.
cd old-repository.git
git push --mirror https://github.com/exampleuser/new-repository.git
참고 URL : https://stackoverflow.com/questions/6613166/how-to-duplicate-a-git-repository-without-forking
'IT박스' 카테고리의 다른 글
div를 채우기 위해 배경 이미지를 늘리는 방법 (0) | 2020.08.26 |
---|---|
명령 줄에서 Makefile에 인수를 전달하는 방법은 무엇입니까? (0) | 2020.08.25 |
공백으로 구분 된 문자열을 목록으로 변환 (0) | 2020.08.25 |
왜 Large Object Heap이고 왜 우리가 관심을 갖는가? (0) | 2020.08.25 |
git 브랜치 간 특정 폴더의 차이점 (0) | 2020.08.25 |