1GIT-MV(1) Git Manual GIT-MV(1)
2
3
4
6 git-mv - Move or rename a file, a directory, or a symlink
7
9 git mv <options>... <args>...
10
12 This script is used to move or rename a file, directory or symlink.
13
14 git mv [-f] [-n] <source> <destination>
15 git mv [-f] [-n] [-k] <source> ... <destination directory>
16
17 In the first form, it renames <source>, which must exist and be either
18 a file, symlink or directory, to <destination>. In the second form, the
19 last argument has to be an existing directory; the given sources will
20 be moved into this directory.
21
22 The index is updated after successful completion, but the change must
23 still be committed.
24
26 -f, --force
27 Force renaming or moving of a file even if the target exists
28
29 -k
30 Skip move or rename actions which would lead to an error condition.
31 An error happens when a source is neither existing nor controlled
32 by GIT, or when it would overwrite an existing file unless -f is
33 given.
34
35 -n, --dry-run
36 Do nothing; only show what would happen
37
39 Written by Linus Torvalds <torvalds@osdl.org[1]> Rewritten by Ryan
40 Anderson <ryan@michonline.com[2]> Move functionality added by Josef
41 Weidendorfer <Josef.Weidendorfer@gmx.de[3]>
42
44 Documentation by David Greaves, Junio C Hamano and the git-list
45 <git@vger.kernel.org[4]>.
46
48 Part of the git(1) suite
49
51 1. torvalds@osdl.org
52 mailto:torvalds@osdl.org
53
54 2. ryan@michonline.com
55 mailto:ryan@michonline.com
56
57 3. Josef.Weidendorfer@gmx.de
58 mailto:Josef.Weidendorfer@gmx.de
59
60 4. git@vger.kernel.org
61 mailto:git@vger.kernel.org
62
63
64
65Git 1.7.4.4 04/11/2011 GIT-MV(1)