GIT-MV(1) Git Manual GIT-MV(1)NAME
git-mv - Move or rename a file, a directory, or a symlink
SYNOPSIS
git mv <options>... <args>...
DESCRIPTION
This script is used to move or rename a file, directory or symlink.
git mv [-f] [-n] <source> <destination>
git mv [-f] [-n] [-k] <source> ... <destination directory>
In the first form, it renames <source>, which must exist and be either a file, symlink or directory, to <destination>. In the second form,
the last argument has to be an existing directory; the given sources will be moved into this directory.
The index is updated after successful completion, but the change must still be committed.
OPTIONS -f, --force
Force renaming or moving of a file even if the target exists
-k
Skip move or rename actions which would lead to an error condition. An error happens when a source is neither existing nor controlled
by GIT, or when it would overwrite an existing file unless -f is given.
-n, --dry-run
Do nothing; only show what would happen
AUTHOR
Written by Linus Torvalds <torvalds@osdl.org[1]> Rewritten by Ryan Anderson <ryan@michonline.com[2]> Move functionality added by Josef
Weidendorfer <Josef.Weidendorfer@gmx.de[3]>
DOCUMENTATION
Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org[4]>.
GIT
Part of the git(1) suite
NOTES
1. torvalds@osdl.org
mailto:torvalds@osdl.org
2. ryan@michonline.com
mailto:ryan@michonline.com
3. Josef.Weidendorfer@gmx.de
mailto:Josef.Weidendorfer@gmx.de
4. git@vger.kernel.org
mailto:git@vger.kernel.org
Git 1.7.1 07/05/2010 GIT-MV(1)
Check Out this Related Man Page
GIT-PATCH-ID(1) Git Manual GIT-PATCH-ID(1)NAME
git-patch-id - Compute unique ID for a patch
SYNOPSIS
git patch-id < <patch>
DESCRIPTION
A "patch ID" is nothing but a SHA1 of the diff associated with a patch, with whitespace and line numbers ignored. As such, it's "reasonably
stable", but at the same time also reasonably unique, i.e., two patches that have the same "patch ID" are almost guaranteed to be the same
thing.
IOW, you can use this thing to look for likely duplicate commits.
When dealing with git diff-tree output, it takes advantage of the fact that the patch is prefixed with the object name of the commit, and
outputs two 40-byte hexadecimal strings. The first string is the patch ID, and the second string is the commit ID. This can be used to make
a mapping from patch ID to commit ID.
OPTIONS
<patch>
The diff to create the ID of.
AUTHOR
Written by Linus Torvalds <torvalds@osdl.org[1]>
DOCUMENTATION
Documentation by Junio C Hamano and the git-list <git@vger.kernel.org[2]>.
GIT
Part of the git(1) suite
NOTES
1. torvalds@osdl.org
mailto:torvalds@osdl.org
2. git@vger.kernel.org
mailto:git@vger.kernel.org
Git 1.7.1 07/05/2010 GIT-PATCH-ID(1)
i'm trying to move a file from one diectory to another and rename it at the same time. but its giving me an error .
" mv: cannot unlink /dir2/file5 : No such file or directory"
here is the command I'm using.
mv /dir1/file1 /dir2/file5
solaris 8 (1 Reply)
This link is to a page that has two short videos that feature Linus Torvalds discussing the Linux kernel. After you watch the first video, scroll down some more to reach the second video. (0 Replies)
I have several hundred files in one directory which I need to move to another directory with the new extension, for example:
/bb/data/rptmgr* are in the source directory need to be moved to
/bb/data55/rptmgr*.new
Is there an efficient way to do it? Thanks -A (4 Replies)
Hi all,
i would like to create a script that move and rename files from all the subdirectories of a given directory to others subdirectories of the same directory based on "matching" criteria in the "from" and "to" parameters.
Example:
Begin script
from /home/test/1_T_2008* move to... (3 Replies)
This is my task - pls help
Write a script that will run every 5 min and check if a particular file has appeared in a particular directory. Once it appears then rename the file and move it a bkp directory and run another script. (3 Replies)
I am looking for advice on how to write a script that will rename and/or move files to a different directory based upon the results of a grep.
Let's say I have ten files in a directory. Some of them - not all - contain the text 'HELLO'. I would like to be able to grep the files for that text,... (3 Replies)
Hello All,
I am trying to write a script to:-
1. Traverse entire file system, look for directories which has .git directory in it
2. Rename the immediate parent directory to <orignal_name.git>
3. Traverse new file structure and look for all directories with <original_name>.git
4. cd to... (2 Replies)
Hi All,
I have a simple shell script to move .txt file(s) from a source directory one after another to the destination. The source directory is shared to windows using samba. The source files are arriving continuously and approx size is 10-15 KB. Some time the file size reached upto 100 KB and... (9 Replies)
Dear all,
I am facing a issue in MV command, this move is done by our c program. We are moving the file to same directory so basically I think it will be a rename of the inode. So we might not useany extra space then why the move is failing. Does it require space to move the same size of file... (5 Replies)
Hi guys, I need some assistance moving a LV. :D
I have a VG with two PV; on the second PV there is only one LV so I want to move it to the first PV (hdisk1) in order to get rid of the second one (hdisk2)
Something like (pseudocode):
move MyLV from hdisk2 to hdisk1
How can I achieve that? (4 Replies)
hello everyone,
this is my first post in this forum, I hope I am in the right place :)
I am relatively new to AIX, and I need help doing the following:
move data from directory /universe_log/CIHPRD to /universe_log/novabch1
while changing lv and preserving mount point.
below some... (7 Replies)
Hey all, I really need help with some homework I'm having on UNIX. This probably sounds stupid, but I'm being asked to move a file to a specific directory and rename it a specified name in one command. I know how to do it in more than one command, I just can't seem to figure it out using only one... (1 Reply)
Apologies if this is the wrong forum but...
...This is hard hitting stuff.
LKML: Linus Torvalds: Re: x86/enter: Create macros to restrict/unrestrict Indirect Branch Speculation (5 Replies)