
내 Git 저장소를 에서 호스팅합니다 [email protected]
. 따라서 새 저장소를 생성하려면 다음을 수행해야 합니다.
ssh [email protected]
git init --bare ~/git/new_repo.git
exit
git clone [email protected]:git/new_repo
이것은 매우 지루하고 성가신 일입니다.
내가 하고 싶은 것은 이것이다(내 로컬 컴퓨터에서):
git create_and_clone [email protected]:git/new_repo.git
이를 수행할 수 있는 명령이 있습니까? 스크립트를 쉽게 작성할 수 있지만 1개의 라이너가 내장되어 있으면 편리할 것입니다.
답변1
아니요, 원격 호스트에서 이 작업을 수행하는 명령이 git 툴킷에 없습니다. 다음과 같이 단축할 수 있습니다.
ssh [email protected] 'git init --bare git/new_repo.git'