私は 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'