From: Hugo Sales Date: Mon, 09 Oct 2023 23:34:58 GMT Subject: [PATCH 3/3] mv: Add documentation for new `-p' flag Message-ID: <20231009233458.1371351-4-hugo@hsal.es> In-Reply-To: <20231009233458.1371351-1-hugo@hsal.es> Signed-off-by: Hugo Sales --- Documentation/git-mv.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Documentation/git-mv.txt b/Documentation/git-mv.txt index fb0220fd18..70c1e9572c 100644 --- a/Documentation/git-mv.txt +++ b/Documentation/git-mv.txt @@ -15,13 +15,14 @@ DESCRIPTION ----------- Move or rename a file, directory or symlink. - git mv [-v] [-f] [-n] [-k] - git mv [-v] [-f] [-n] [-k] ... + git mv [-v] [-f] [-n] [-k] [-p] + git mv [-v] [-f] [-n] [-k] [-p] ... In the first form, it renames , which must exist and be either a file, symlink or directory, to . -In the second form, the last argument has to be an existing -directory; the given sources will be moved into this directory. +In the second form, the last argument refers to a directory, which has +to exist unless -p is specified, in which case it gets created; the +given sources will be moved into this directory. The index is updated after successful completion, but the change must still be committed. @@ -39,6 +40,9 @@ OPTIONS -n:: --dry-run:: Do nothing; only show what would happen +-p:: +--parents:: + Create missing parent directories in the or path. Similar to `mkdir -p', all missing leading directories are created. -v:: --verbose:: -- 2.42.0