X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-update-index.txt;h=0a1953803e48947f6eeae385550ac2cd4e838411;hb=27c1dbea3e3a23b3c4b3707dfc9a71c3279ae279;hp=57177c7fb6fea75a39c3243495b0724a207add17;hpb=fd60acaced6de16ebfb66959067e2b29f99a133e;p=git.git diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt index 57177c7fb..0a1953803 100644 --- a/Documentation/git-update-index.txt +++ b/Documentation/git-update-index.txt @@ -3,7 +3,7 @@ git-update-index(1) NAME ---- -git-update-index - Modifies the index or directory cache +git-update-index - Register file contents in the working tree to the index SYNOPSIS @@ -15,7 +15,7 @@ SYNOPSIS [--cacheinfo ]\* [--chmod=(+|-)x] [--assume-unchanged | --no-assume-unchanged] - [--really-refresh] [--unresolve] + [--really-refresh] [--unresolve] [--again | -g] [--info-only] [--index-info] [-z] [--stdin] [--verbose] @@ -27,6 +27,9 @@ Modifies the index or directory cache. Each file mentioned is updated into the index and any 'unmerged' or 'needs updating' state is cleared. +See also gitlink:git-add[1] for a more user-friendly way to do some of +the most common operations on the index. + The way "git-update-index" handles files it is told about can be modified using the various options: @@ -40,7 +43,7 @@ OPTIONS --remove:: If a specified file is in the index but is missing then it's removed. - Default behaviour is to ignore removed file. + Default behavior is to ignore removed file. --refresh:: Looks at the current index and checks to see if merges or @@ -53,7 +56,7 @@ OPTIONS --unmerged:: If --refresh finds unmerged changes in the index, the default - behavior is to error out. This option makes git-update-index + behavior is to error out. This option makes git-update-index continue anyway. --ignore-missing:: @@ -61,12 +64,12 @@ OPTIONS --cacheinfo :: Directly insert the specified info into the index. - + --index-info:: Read index information from stdin. --chmod=(+|-)x:: - Set the execute permissions on the updated files. + Set the execute permissions on the updated files. --assume-unchanged, --no-assume-unchanged:: When these flags are specified, the object name recorded @@ -80,6 +83,10 @@ OPTIONS filesystem that has very slow lstat(2) system call (e.g. cifs). +--again, -g:: + Runs `git-update-index` itself on the paths whose index + entries are different from those from the `HEAD` commit. + --unresolve:: Restores the 'unmerged' or 'needs updating' state of a file during a merge if it was cleared by accident. @@ -119,7 +126,7 @@ OPTIONS :: Files to act on. Note that files beginning with '.' are discarded. This includes - `./file` and `dir/./file`. If you don't want this, then use + `./file` and `dir/./file`. If you don't want this, then use cleaner names. The same applies to directories ending '/' and paths with '//' @@ -212,8 +219,8 @@ $ git ls-files -s ------------ -Using "assume unchanged" bit ----------------------------- +Using ``assume unchanged'' bit +------------------------------ Many operations in git depend on your filesystem to have an efficient `lstat(2)` implementation, so that `st_mtime` @@ -285,19 +292,25 @@ Configuration The command honors `core.filemode` configuration variable. If your repository is on an filesystem whose executable bits are -unreliable, this should be set to 'false' (see gitlink:git-repo-config[1]). +unreliable, this should be set to 'false' (see gitlink:git-config[1]). This causes the command to ignore differences in file modes recorded in the index and the file mode on the filesystem if they differ only on executable bit. On such an unfortunate filesystem, you may need to use `git-update-index --chmod=`. +Quite similarly, if `core.symlinks` configuration variable is set +to 'false' (see gitlink:git-config[1]), symbolic links are checked out +as plain files, and this command does not modify a recorded file mode +from symbolic link to regular file. + The command looks at `core.ignorestat` configuration variable. See 'Using "assume unchanged" bit' section above. See Also -------- -gitlink:git-repo-config[1] +gitlink:git-config[1], +gitlink:git-add[1] Author @@ -311,4 +324,3 @@ Documentation by David Greaves, Junio C Hamano and the git-list