Git サブモジュールをサブディレクトリに追加するにはどうすればよいですか? 質問する

Git サブモジュールをサブディレクトリに追加するにはどうすればよいですか? 質問する

に Git リポジトリがあり、~/.janus/その中には多数のサブモジュールが含まれています。 にサブモジュールを追加したいのです~/.janus/snipmate-snippets/snippets/が、ディレクトリで を実行すると、次のエラー メッセージが表示されます。git submodule add <[email protected]:...>snipmate-snippets

You need to run this command from the top level of the working tree.

質問は、snipmate-snippetsディレクトリにサブモジュールを追加するにはどうすればいいかということです。

ベストアンサー1

次のように入力し~/.janusて実行します:

git submodule add <git@github ...> snipmate-snippets/snippets/

サブモジュール(またはgit全般)に関する詳細情報が必要な場合プロギットかなり便利です。

おすすめ記事