@matheusbsbs / matheus-bagliano / commits / 302cc11a32
Fork 0

Documentation on --git-dir and --work-tree

Liu Yubao committed Apr 29, 2008 at 04:09 UTC 302cc11a32732a0a3f0a7875b1857098e1964929
2 files changed +15 -3
Documentation/config.txt
+7 -1
@@ -234,7 +234,13 @@ core.worktree::
234 used in combination with repositories found automatically in
235 a .git directory (i.e. $GIT_DIR is not set).
236 This can be overridden by the GIT_WORK_TREE environment
237 - variable and the '--work-tree' command line option.
237 + variable and the '--work-tree' command line option. It can be
238 + a absolute path or relative path to the directory specified by
239 + --git-dir or GIT_DIR.
240 + Note: If --git-dir or GIT_DIR are specified but none of
241 + --work-tree, GIT_WORK_TREE and core.worktree is specified,
242 + the current working directory is regarded as the top directory
243 + of your working tree.
244
245 core.logAllRefUpdates::
246 Enable the reflog. Updates to a ref <ref> is logged to the file
Documentation/git.txt
+8 -2
@@ -143,7 +143,8 @@ help ...'.
143
144 --git-dir=<path>::
145 Set the path to the repository. This can also be controlled by
146 - setting the GIT_DIR environment variable.
146 + setting the GIT_DIR environment variable. It can be an absolute
147 + path or relative path to current working directory.
148
149 --work-tree=<path>::
150 Set the path to the working tree. The value will not be
@@ -151,7 +152,12 @@ help ...'.
152 a .git directory (i.e. $GIT_DIR is not set).
153 This can also be controlled by setting the GIT_WORK_TREE
154 environment variable and the core.worktree configuration
154 - variable.
155 + variable. It can be an absolute path or relative path to
156 + the directory specified by --git-dir or GIT_DIR.
157 + Note: If --git-dir or GIT_DIR are specified but none of
158 + --work-tree, GIT_WORK_TREE and core.worktree is specified,
159 + the current working directory is regarded as the top directory
160 + of your working tree.
161
162 --bare::
163 Treat the repository as a bare repository. If GIT_DIR