From: Liu Yubao Date: Mon, 28 Apr 2008 20:09:20 +0000 (+0800) Subject: Documentation on --git-dir and --work-tree X-Git-Tag: v1.5.6-rc0~109 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=302cc11a32732a0a3f0a7875b1857098e1964929;p=git.git Documentation on --git-dir and --work-tree --- diff --git a/Documentation/config.txt b/Documentation/config.txt index 7a24f6e81..824e416e9 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -234,7 +234,13 @@ core.worktree:: used in combination with repositories found automatically in a .git directory (i.e. $GIT_DIR is not set). This can be overridden by the GIT_WORK_TREE environment - variable and the '--work-tree' command line option. + variable and the '--work-tree' command line option. It can be + a absolute path or relative path to the directory specified by + --git-dir or GIT_DIR. + Note: If --git-dir or GIT_DIR are specified but none of + --work-tree, GIT_WORK_TREE and core.worktree is specified, + the current working directory is regarded as the top directory + of your working tree. core.logAllRefUpdates:: Enable the reflog. Updates to a ref is logged to the file diff --git a/Documentation/git.txt b/Documentation/git.txt index a070e078e..6f445b1e3 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -143,7 +143,8 @@ help ...'. --git-dir=:: Set the path to the repository. This can also be controlled by - setting the GIT_DIR environment variable. + setting the GIT_DIR environment variable. It can be an absolute + path or relative path to current working directory. --work-tree=:: Set the path to the working tree. The value will not be @@ -151,7 +152,12 @@ help ...'. a .git directory (i.e. $GIT_DIR is not set). This can also be controlled by setting the GIT_WORK_TREE environment variable and the core.worktree configuration - variable. + variable. It can be an absolute path or relative path to + the directory specified by --git-dir or GIT_DIR. + Note: If --git-dir or GIT_DIR are specified but none of + --work-tree, GIT_WORK_TREE and core.worktree is specified, + the current working directory is regarded as the top directory + of your working tree. --bare:: Treat the repository as a bare repository. If GIT_DIR