SYNOPSIS

git mv [-v] [-f] [-n] [-k] <source> <destination>
git mv [-v] [-f] [-n] [-k] <source>... <destination-directory>

DESCRIPTION

ファイルまたはディレクトリまたはシンボリックリンクを、移動または名前変更します。

In the first form, it renames <source>, which must exist and be either a file, symlink or directory, to <destination>. In the second form, <destination-directory> has to be an existing directory; the given sources will be moved into this directory.

正常に完了するとインデックスは更新されますが、変更はコミットする必要があります。

OPTIONS

-f
--force

<destination> が存在する場合でも、 ファイルの名前変更または移動を強制します

-k

エラー状態になる移動または名前変更をスキップします。ソースが存在せず、Gitによって制御されていない場合、または -f が指定されていない限り、ソースが既存のファイルを上書きする場合、エラーが発生します。

-n
--dry-run

何も操作しない。何が起こるかを示すだけです。

-v
--verbose

移動するファイルの名前を報告します。

SUBMODULES

Moving a submodule using a gitfile (which means they were cloned with a Git version 1.7.8 or newer) will update the gitfile and core.worktree setting to make the submodule work in the new location. It also will attempt to update the submodule.<name>.path setting in the gitmodules(5) file and stage that file (unless -n is used).

BUGS

スーパー・プロジェクトの更新により、入力されたサブモジュールが移動されるたびに(たとえば、移動の前後でコミットを切り替える場合)、古いサブモジュールのチェックアウトは古い場所に残り、空のディレクトリが新しい場所に表示されます。新しい場所にサブモジュールを再度入力するには、後で「git submodule update」を実行する必要があります。古いディレクトリの削除は、gitfileを使用している場合にのみ安全です。そうでなければ、サブモジュールの履歴も削除されます。 再帰的なサブモジュール更新が実装されれば、これらの手順は両方とも不要になることでしょう。

GIT

Part of the git(1) suite