Code

Fix gitdir detection when in subdir of gitdir
[git.git] / Documentation / git-rm.txt
index 6481f4ae5211b1c460299673a281a69e3f59c7f8..5afb1e7428126c79171cf7e7b1fb027e1de64c86 100644 (file)
@@ -7,12 +7,12 @@ git-rm - Remove files from the working tree and from the index
 
 SYNOPSIS
 --------
 
 SYNOPSIS
 --------
-'git-rm' [-f] [-n] [-r] [--cached] [--ignore-unmatch] [--quiet] [--] <file>...
+'git rm' [-f | --force] [-n] [-r] [--cached] [--ignore-unmatch] [--quiet] [--] <file>...
 
 DESCRIPTION
 -----------
 Remove files from the index, or from the working tree and the index.
 
 DESCRIPTION
 -----------
 Remove files from the index, or from the working tree and the index.
-`git rm` will not remove a file from just your working directory.
+'git-rm' will not remove a file from just your working directory.
 (There is no option to remove a file only from the work tree
 and yet keep it in the index; use `/bin/rm` if you want to do that.)
 The files being removed have to be identical to the tip of the branch,
 (There is no option to remove a file only from the work tree
 and yet keep it in the index; use `/bin/rm` if you want to do that.)
 The files being removed have to be identical to the tip of the branch,
@@ -36,9 +36,11 @@ OPTIONS
        but this requires the `-r` option to be explicitly given.
 
 -f::
        but this requires the `-r` option to be explicitly given.
 
 -f::
+--force::
        Override the up-to-date check.
 
        Override the up-to-date check.
 
--n, \--dry-run::
+-n::
+--dry-run::
        Don't actually remove any file(s).  Instead, just show
        if they exist in the index and would otherwise be removed
        by the command.
        Don't actually remove any file(s).  Instead, just show
        if they exist in the index and would otherwise be removed
        by the command.
@@ -52,16 +54,17 @@ OPTIONS
        the list of files, (useful when filenames might be mistaken
        for command-line options).
 
        the list of files, (useful when filenames might be mistaken
        for command-line options).
 
-\--cached::
+--cached::
        Use this option to unstage and remove paths only from the index.
        Working tree files, whether modified or not, will be
        left alone.
 
        Use this option to unstage and remove paths only from the index.
        Working tree files, whether modified or not, will be
        left alone.
 
-\--ignore-unmatch::
+--ignore-unmatch::
        Exit with a zero status even if no files matched.
 
        Exit with a zero status even if no files matched.
 
--q, \--quiet::
-       git-rm normally outputs one line (in the form of an "rm" command)
+-q::
+--quiet::
+       'git-rm' normally outputs one line (in the form of an "rm" command)
        for each file removed. This option suppresses that output.
 
 
        for each file removed. This option suppresses that output.
 
 
@@ -80,7 +83,7 @@ also remove all of directory `d2`.
 
 EXAMPLES
 --------
 
 EXAMPLES
 --------
-git-rm Documentation/\\*.txt::
+git rm Documentation/\\*.txt::
        Removes all `\*.txt` files from the index that are under the
        `Documentation` directory and any of its subdirectories.
 +
        Removes all `\*.txt` files from the index that are under the
        `Documentation` directory and any of its subdirectories.
 +
@@ -88,7 +91,7 @@ Note that the asterisk `\*` is quoted from the shell in this
 example; this lets git, and not the shell, expand the pathnames
 of files and subdirectories under the `Documentation/` directory.
 
 example; this lets git, and not the shell, expand the pathnames
 of files and subdirectories under the `Documentation/` directory.
 
-git-rm -f git-*.sh::
+git rm -f git-*.sh::
        Because this example lets the shell expand the asterisk
        (i.e. you are listing the files explicitly), it
        does not remove `subdir/git-foo.sh`.
        Because this example lets the shell expand the asterisk
        (i.e. you are listing the files explicitly), it
        does not remove `subdir/git-foo.sh`.
@@ -107,4 +110,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite