![gitが複製するときに理解しやすいようにリモートリポジトリの名前を変更する方法[重複]](https://linux33.com/image/11146/git%E3%81%8C%E8%A4%87%E8%A3%BD%E3%81%99%E3%82%8B%E3%81%A8%E3%81%8D%E3%81%AB%E7%90%86%E8%A7%A3%E3%81%97%E3%82%84%E3%81%99%E3%81%84%E3%82%88%E3%81%86%E3%81%AB%E3%83%AA%E3%83%A2%E3%83%BC%E3%83%88%E3%83%AA%E3%83%9D%E3%82%B8%E3%83%88%E3%83%AA%E3%81%AE%E5%90%8D%E5%89%8D%E3%82%92%E5%A4%89%E6%9B%B4%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95%5B%E9%87%8D%E8%A4%87%5D.png)
一般的に理解しやすく名前を変更する方法は次のとおりです。
$ git clone <remote URL.git>
$ mv remotedir nameIwant
これを行うより良い方法があるかどうか疑問に思います。
その理由は、時々フォークを試してメインストアを維持したいからです。オリジナルなので、フォークの名前も原産地によって変わりました。リポジトリの~/.git/configからリモートパスを取得できることを知っていますが、これは覚えやすいです。
もっと良い方法がありますか?
オンラインで検索しましたが、役に立つものが見つかりませんでした。
答え1
コマンドの後に目的の宛先ディレクトリ名を指定してみてください。たとえば、次のようになります。
git clone <remote URL.git> nameIwant
からman git-clone
:
<directory>
The name of a new directory to clone into. The "humanish" part of
the source repository is used if no directory is explicitly given
(repo for /path/to/repo.git and foo for host.xz:foo/.git). Cloning
into an existing directory is only allowed if the directory is
empty.