Skip to content

Commit

Permalink
Documentation on --git-dir and --work-tree
Browse files Browse the repository at this point in the history
  • Loading branch information
Liu Yubao authored and Junio C Hamano committed Apr 30, 2008
1 parent 0104ca0 commit 302cc11
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
8 changes: 7 additions & 1 deletion Documentation/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 <ref> is logged to the file
Expand Down
10 changes: 8 additions & 2 deletions Documentation/git.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,21 @@ help ...'.

--git-dir=<path>::
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=<path>::
Set the path to the working tree. The value will not be
used in combination with repositories found automatically in
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
Expand Down

0 comments on commit 302cc11

Please sign in to comment.