diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-09-20 12:35:42 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-09-20 12:35:42 -0700 |
commit | 087350398e8b2c5d4b39f051b23a2e533f4d830b (patch) | |
tree | 2cd7effc6e38cb59c117262c839080ff0db97802 /Documentation/git.txt | |
parent | f26f250b442b57d0e6d9295bb98690ce70640759 (diff) | |
parent | 28a81f8b93897402a8c8c15ee16e67f0c24ac11c (diff) | |
download | git-087350398e8b2c5d4b39f051b23a2e533f4d830b.tar.gz git-087350398e8b2c5d4b39f051b23a2e533f4d830b.tar.xz |
Merge branch 'nr/git-cd-to-a-directory'
Just like "make -C <directory>", make "git -C <directory> ..." to
go there before doing anything else.
* nr/git-cd-to-a-directory:
t0056: "git -C" test updates
git: run in a directory given with -C option
Diffstat (limited to 'Documentation/git.txt')
-rw-r--r-- | Documentation/git.txt | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Documentation/git.txt b/Documentation/git.txt index c4f0ed595..5d68d33e4 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -9,7 +9,7 @@ git - the stupid content tracker SYNOPSIS -------- [verse] -'git' [--version] [--help] [-c <name>=<value>] +'git' [--version] [--help] [-C <path>] [-c <name>=<value>] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path] [-p|--paginate|--no-pager] [--no-replace-objects] [--bare] [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>] @@ -395,6 +395,20 @@ displayed. See linkgit:git-help[1] for more information, because `git --help ...` is converted internally into `git help ...`. +-C <path>:: + Run as if git was started in '<path>' instead of the current working + directory. When multiple `-C` options are given, each subsequent + non-absolute `-C <path>` is interpreted relative to the preceding `-C + <path>`. ++ +This option affects options that expect path name like `--git-dir` and +`--work-tree` in that their interpretations of the path names would be +made relative to the working directory caused by the `-C` option. For +example the following invocations are equivalent: + + git --git-dir=a.git --work-tree=b -C c status + git --git-dir=c/a.git --work-tree=c/b status + -c <name>=<value>:: Pass a configuration parameter to the command. The value given will override values from configuration files. |