Skip to content
Snippets Groups Projects
Commit 221cdfc4 authored by Jean-Noël Avila's avatar Jean-Noël Avila
Browse files

Update english sources of docs to v2.21.0

parent 51133766
No related branches found
No related tags found
No related merge requests found
Showing
with 431 additions and 239 deletions
......@@ -92,8 +92,8 @@ It is okay to err on the side of caution, causing the bundle file
to contain objects already in the destination, as these are ignored
when unpacking at the destination.
EXAMPLE
-------
EXAMPLES
--------
Assume you want to transfer the history from a repository R1 on machine A
to another repository R2 on machine B.
......
......@@ -23,8 +23,8 @@ In the second form, a list of objects (separated by linefeeds) is provided on
stdin, and the SHA-1, type, and size of each object is printed on stdout. The
output format can be overridden using the optional `<format>` argument. If
either `--textconv` or `--filters` was specified, the input is expected to
list the object names followed by the path name, separated by a single white
space, so that the appropriate drivers can be determined.
list the object names followed by the path name, separated by a single
whitespace, so that the appropriate drivers can be determined.
OPTIONS
-------
......@@ -42,8 +42,9 @@ OPTIONS
<object>.
-e::
Suppress all output; instead exit with zero status if <object>
exists and is a valid object.
Exit with zero status if <object> exists and is a valid
object. If <object> is of an invalid format exit with non-zero and
emits an error on stderr.
-p::
Pretty-print the contents of <object> based on its type.
......@@ -78,7 +79,7 @@ OPTIONS
Print object information and contents for each object provided
on stdin. May not be combined with any other options or arguments
except `--textconv` or `--filters`, in which case the input lines
also need to specify the path, separated by white space. See the
also need to specify the path, separated by whitespace. See the
section `BATCH OUTPUT` below for details.
--batch-check::
......@@ -86,7 +87,7 @@ OPTIONS
Print object information for each object provided on stdin. May
not be combined with any other options or arguments except
`--textconv` or `--filters`, in which case the input lines also
need to specify the path, separated by white space. See the
need to specify the path, separated by whitespace. See the
section `BATCH OUTPUT` below for details.
--batch-all-objects::
......@@ -103,6 +104,16 @@ OPTIONS
buffering; this is much more efficient when invoking
`--batch-check` on a large number of objects.
--unordered::
When `--batch-all-objects` is in use, visit objects in an
order which may be more efficient for accessing the object
contents than hash order. The exact details of the order are
unspecified, but if you do not require a specific order, this
should generally result in faster output, especially with
`--batch`. Note that `cat-file` will still show each object
only once, even if it is stored multiple times in the
repository.
--allow-unknown-type::
Allow -s or -t to query broken/corrupt objects of unknown type.
......@@ -168,7 +179,7 @@ If `-t` is specified, one of the <type>.
If `-s` is specified, the size of the <object> in bytes.
If `-e` is specified, no output.
If `-e` is specified, no output, unless the <object> is malformed.
If `-p` is specified, the contents of <object> are pretty-printed.
......@@ -192,7 +203,7 @@ newline. The available atoms are:
The 40-hex object name of the object.
`objecttype`::
The type of of the object (the same as `cat-file -t` reports).
The type of the object (the same as `cat-file -t` reports).
`objectsize`::
The size, in bytes, of the object (the same as `cat-file -s`
......@@ -241,6 +252,12 @@ the repository, then `cat-file` will ignore any custom format and print:
<object> SP missing LF
------------
If a name is specified that might refer to more than one object (an ambiguous short sha), then `cat-file` will ignore any custom format and print:
------------
<object> SP ambiguous LF
------------
If --follow-symlinks is used, and a symlink in the repository points
outside the repository, then `cat-file` will ignore any custom format
and print:
......
......@@ -9,8 +9,8 @@ git-check-attr - Display gitattributes information
SYNOPSIS
--------
[verse]
'git check-attr' [-a | --all | attr...] [--] pathname...
'git check-attr' --stdin [-z] [-a | --all | attr...]
'git check-attr' [-a | --all | <attr>...] [--] <pathname>...
'git check-attr' --stdin [-z] [-a | --all | <attr>...]
DESCRIPTION
-----------
......
......@@ -9,8 +9,8 @@ git-check-ignore - Debug gitignore / exclude files
SYNOPSIS
--------
[verse]
'git check-ignore' [options] pathname...
'git check-ignore' [options] --stdin
'git check-ignore' [<options>] <pathname>...
'git check-ignore' [<options>] --stdin
DESCRIPTION
-----------
......
......@@ -9,7 +9,7 @@ git-check-mailmap - Show canonical names and email addresses of contacts
SYNOPSIS
--------
[verse]
'git check-mailmap' [options] <contact>...
'git check-mailmap' [<options>] <contact>...
DESCRIPTION
......
......@@ -77,11 +77,23 @@ reference name expressions (see linkgit:gitrevisions[7]):
. at-open-brace `@{` is used as a notation to access a reflog entry.
With the `--branch` option, it expands the ``previous branch syntax''
`@{-n}`. For example, `@{-1}` is a way to refer the last branch you
were on. This option should be used by porcelains to accept this
syntax anywhere a branch name is expected, so they can act as if you
typed the branch name.
With the `--branch` option, the command takes a name and checks if
it can be used as a valid branch name (e.g. when creating a new
branch). But be cautious when using the
previous checkout syntax that may refer to a detached HEAD state.
The rule `git check-ref-format --branch $name` implements
may be stricter than what `git check-ref-format refs/heads/$name`
says (e.g. a dash may appear at the beginning of a ref component,
but it is explicitly forbidden at the beginning of a branch name).
When run with `--branch` option in a repository, the input is first
expanded for the ``previous checkout syntax''
`@{-n}`. For example, `@{-1}` is a way to refer the last thing that
was checked out using "git checkout" operation. This option should be
used by porcelains to accept this syntax anywhere a branch name is
expected, so they can act as if you typed the branch name. As an
exception note that, the ``previous checkout operation'' might result
in a commit object name when the N-th last thing checked out was not
a branch.
OPTIONS
-------
......@@ -109,7 +121,7 @@ OPTIONS
EXAMPLES
--------
* Print the name of the previous branch:
* Print the name of the previous thing checked out:
+
------------
$ git check-ref-format --branch @{-1}
......
......@@ -13,7 +13,8 @@ SYNOPSIS
'git checkout' [-q] [-f] [-m] [--detach] <commit>
'git checkout' [-q] [-f] [-m] [[-b|-B|--orphan] <new_branch>] [<start_point>]
'git checkout' [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>...
'git checkout' [-p|--patch] [<tree-ish>] [--] [<paths>...]
'git checkout' [<tree-ish>] [--] <pathspec>...
'git checkout' (-p|--patch) [<tree-ish>] [--] [<paths>...]
DESCRIPTION
-----------
......@@ -37,8 +38,17 @@ equivalent to
$ git checkout -b <branch> --track <remote>/<branch>
------------
+
If the branch exists in multiple remotes and one of them is named by
the `checkout.defaultRemote` configuration variable, we'll use that
one for the purposes of disambiguation, even if the `<branch>` isn't
unique across all remotes. Set it to
e.g. `checkout.defaultRemote=origin` to always checkout remote
branches from there if `<branch>` is ambiguous but exists on the
'origin' remote. See also `checkout.defaultRemote` in
linkgit:git-config[1].
+
You could omit <branch>, in which case the command degenerates to
"check out the current branch", which is a glorified no-op with a
"check out the current branch", which is a glorified no-op with
rather expensive side-effects to show only the tracking information,
if exists, for the current branch.
......@@ -78,20 +88,13 @@ be used to detach HEAD at the tip of the branch (`git checkout
+
Omitting <branch> detaches HEAD at the tip of the current branch.
'git checkout' [-p|--patch] [<tree-ish>] [--] <pathspec>...::
'git checkout' [<tree-ish>] [--] <pathspec>...::
When <paths> or `--patch` are given, 'git checkout' does *not*
switch branches. It updates the named paths in the working tree
from the index file or from a named <tree-ish> (most often a
commit). In this case, the `-b` and `--track` options are
meaningless and giving either of them results in an error. The
<tree-ish> argument can be used to specify a specific tree-ish
(i.e. commit, tag or tree) to update the index for the given
paths before updating the working tree.
+
'git checkout' with <paths> or `--patch` is used to restore modified or
deleted paths to their original contents from the index or replace paths
with the contents from a named <tree-ish> (most often a commit-ish).
Overwrite paths in the working tree by replacing with the
contents in the index or in the <tree-ish> (most often a
commit). When a <tree-ish> is given, the paths that
match the <pathspec> are updated both in the index and in
the working tree.
+
The index may contain unmerged entries because of a previous failed merge.
By default, if you try to check out such an entry from the index, the
......@@ -101,6 +104,14 @@ specific side of the merge can be checked out of the index by
using `--ours` or `--theirs`. With `-m`, changes made to the working tree
file can be discarded to re-create the original conflicted merge result.
'git checkout' (-p|--patch) [<tree-ish>] [--] [<pathspec>...]::
This is similar to the "check out paths to the working tree
from either the index or from a tree-ish" mode described
above, but lets you use the interactive interface to show
the "diff" output and choose which hunks to use in the
result. See below for the description of `--patch` option.
OPTIONS
-------
-q::
......@@ -256,6 +267,19 @@ section of linkgit:git-add[1] to learn how to operate the `--patch` mode.
out anyway. In other words, the ref can be held by more than one
worktree.
--[no-]recurse-submodules::
Using --recurse-submodules will update the content of all initialized
submodules according to the commit recorded in the superproject. If
local modifications in a submodule would be overwritten the checkout
will fail unless `-f` is used. If nothing (or --no-recurse-submodules)
is used, the work trees of submodules will not be updated.
Just like linkgit:git-submodule[1], this will detach the
submodules HEAD.
--no-guess::
Do not attempt to create a branch if a remote tracking branch
of the same name exists.
<branch>::
Branch to checkout; if it refers to a branch (i.e., a name that,
when prepended with "refs/heads/", is a valid ref), then that
......@@ -263,11 +287,11 @@ section of linkgit:git-add[1] to learn how to operate the `--patch` mode.
commit, your HEAD becomes "detached" and you are no longer on
any branch (see below for details).
+
As a special case, the `"@{-N}"` syntax for the N-th last branch/commit
checks out branches (instead of detaching). You may also specify
`-` which is synonymous with `"@{-1}"`.
You can use the `"@{-N}"` syntax to refer to the N-th last
branch/commit checked out using "git checkout" operation. You may
also specify `-` which is synonymous to `"@{-1}`.
+
As a further special case, you may use `"A...B"` as a shortcut for the
As a special case, you may use `"A...B"` as a shortcut for the
merge base of `A` and `B` if there is exactly one merge base. You can
leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
......@@ -291,9 +315,9 @@ branch refers to a specific commit. Let's look at a repo with three
commits, one of them tagged, and with branch 'master' checked out:
------------
HEAD (refers to branch 'master')
|
v
HEAD (refers to branch 'master')
|
v
a---b---c branch 'master' (refers to commit 'c')
^
|
......@@ -309,9 +333,9 @@ to commit 'd':
------------
$ edit; git add; git commit
HEAD (refers to branch 'master')
|
v
HEAD (refers to branch 'master')
|
v
a---b---c---d branch 'master' (refers to commit 'd')
^
|
......@@ -378,7 +402,7 @@ at what happens when we then checkout master:
------------
$ git checkout master
HEAD (refers to branch 'master')
HEAD (refers to branch 'master')
e---f |
/ v
a---b---c---d branch 'master' (refers to commit 'd')
......@@ -400,14 +424,14 @@ $ git tag foo <3>
------------
<1> creates a new branch 'foo', which refers to commit 'f', and then
updates HEAD to refer to branch 'foo'. In other words, we'll no longer
be in detached HEAD state after this command.
updates HEAD to refer to branch 'foo'. In other words, we'll no longer
be in detached HEAD state after this command.
<2> similarly creates a new branch 'foo', which refers to commit 'f',
but leaves HEAD detached.
but leaves HEAD detached.
<3> creates a new tag 'foo', which refers to commit 'f',
leaving HEAD detached.
leaving HEAD detached.
If we have moved away from commit 'f', then we must first recover its object
name (typically by using git reflog), and then we can create a reference to
......@@ -435,8 +459,8 @@ EXAMPLES
--------
. The following sequence checks out the `master` branch, reverts
the `Makefile` to two revisions back, deletes hello.c by
mistake, and gets it back from the index.
the `Makefile` to two revisions back, deletes hello.c by
mistake, and gets it back from the index.
+
------------
$ git checkout master <1>
......@@ -470,7 +494,7 @@ $ git checkout -- hello.c
------------
. After working in the wrong branch, switching to the correct
branch would be done using:
branch would be done using:
+
------------
$ git checkout mytopic
......@@ -498,7 +522,7 @@ registered in your index file, so `git diff` would show you what
changes you made since the tip of the new branch.
. When a merge conflict happens during switching branches with
the `-m` option, you would see something like this:
the `-m` option, you would see something like this:
+
------------
$ git checkout -m mytopic
......
......@@ -213,16 +213,16 @@ $ git reset --merge ORIG_HEAD <3>
$ git cherry-pick -Xpatience topic^ <4>
------------
<1> apply the change that would be shown by `git show topic^`.
In this example, the patch does not apply cleanly, so
information about the conflict is written to the index and
working tree and no new commit results.
In this example, the patch does not apply cleanly, so
information about the conflict is written to the index and
working tree and no new commit results.
<2> summarize changes to be reconciled
<3> cancel the cherry-pick. In other words, return to the
pre-cherry-pick state, preserving any local modifications you had in
the working tree.
pre-cherry-pick state, preserving any local modifications
you had in the working tree.
<4> try to apply the change introduced by `topic^` again,
spending extra time to avoid mistakes based on incorrectly matching
context lines.
spending extra time to avoid mistakes based on incorrectly
matching context lines.
SEE ALSO
--------
......
......@@ -13,8 +13,8 @@ SYNOPSIS
[-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror]
[-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>]
[--dissociate] [--separate-git-dir <git dir>]
[--depth <depth>] [--[no-]single-branch]
[--recursive | --recurse-submodules] [--[no-]shallow-submodules]
[--depth <depth>] [--[no-]single-branch] [--no-tags]
[--recurse-submodules[=<pathspec>]] [--[no-]shallow-submodules]
[--jobs <n>] [--] <repository> [<directory>]
DESCRIPTION
......@@ -189,6 +189,12 @@ objects from the source repository into a pack in the cloned repository.
values are given for the same key, each value will be written to
the config file. This makes it safe, for example, to add
additional fetch refspecs to the origin remote.
+
Due to limitations of the current implementation, some configuration
variables do not take effect until after the initial fetch and checkout.
Configuration variables known to not take effect are:
`remote.<name>.mirror` and `remote.<name>.tagOpt`. Use the
corresponding `--mirror` and `--no-tags` options instead.
--depth <depth>::
Create a 'shallow' clone with a history truncated to the
......@@ -215,14 +221,33 @@ objects from the source repository into a pack in the cloned repository.
branch when `--single-branch` clone was made, no remote-tracking
branch is created.
--recursive::
--recurse-submodules::
After the clone is created, initialize all submodules within,
using their default settings. This is equivalent to running
`git submodule update --init --recursive` immediately after
the clone is finished. This option is ignored if the cloned
repository does not have a worktree/checkout (i.e. if any of
`--no-checkout`/`-n`, `--bare`, or `--mirror` is given)
--no-tags::
Don't clone any tags, and set
`remote.<remote>.tagOpt=--no-tags` in the config, ensuring
that future `git pull` and `git fetch` operations won't follow
any tags. Subsequent explicit tag fetches will still work,
(see linkgit:git-fetch[1]).
+
Can be used in conjunction with `--single-branch` to clone and
maintain a branch with no references other than a single cloned
branch. This is useful e.g. to maintain minimal clones of the default
branch of some repository for search indexing.
--recurse-submodules[=<pathspec]::
After the clone is created, initialize and clone submodules
within based on the provided pathspec. If no pathspec is
provided, all submodules are initialized and cloned.
This option can be given multiple times for pathspecs consisting
of multiple entries. The resulting clone has `submodule.active` set to
the provided pathspec, or "." (meaning all submodules) if no
pathspec is provided.
+
Submodules are initialized and cloned using their default settings. This is
equivalent to running
`git submodule update --init --recursive <pathspec>` immediately after
the clone is finished. This option is ignored if the cloned repository does
not have a worktree/checkout (i.e. if any of `--no-checkout`/`-n`, `--bare`,
or `--mirror` is given)
--[no-]shallow-submodules::
All submodules which are cloned will be shallow with a depth of 1.
......@@ -241,7 +266,7 @@ objects from the source repository into a pack in the cloned repository.
<repository>::
The (possibly remote) repository to clone from. See the
<<URLS,URLS>> section below for more information on specifying
<<URLS,GIT URLS>> section below for more information on specifying
repositories.
<directory>::
......@@ -254,7 +279,7 @@ objects from the source repository into a pack in the cloned repository.
:git-clone: 1
include::urls.txt[]
Examples
EXAMPLES
--------
* Clone from upstream:
......
......@@ -13,7 +13,10 @@ SYNOPSIS
DESCRIPTION
-----------
This command formats its input into multiple columns.
This command formats the lines of its standard input into a table with
multiple columns. Each input line occupies one cell of the table. It
is used internally by other git commands to format output into
columns.
OPTIONS
-------
......@@ -23,7 +26,7 @@ OPTIONS
--mode=<mode>::
Specify layout mode. See configuration variable column.ui for option
syntax.
syntax in linkgit:git-config[1].
--raw-mode=<n>::
Same as --mode but take mode encoded as a number. This is mainly used
......@@ -43,6 +46,34 @@ OPTIONS
--padding=<N>::
The number of spaces between columns. One space by default.
EXAMPLES
--------
Format data by columns:
------------
$ seq 1 24 | git column --mode=column --padding=5
1 4 7 10 13 16 19 22
2 5 8 11 14 17 20 23
3 6 9 12 15 18 21 24
------------
Format data by rows:
------------
$ seq 1 21 | git column --mode=row --padding=5
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
------------
List some tags in a table with unequal column widths:
------------
$ git tag --list 'v2.4.*' --column=row,dense
v2.4.0 v2.4.0-rc0 v2.4.0-rc1 v2.4.0-rc2 v2.4.0-rc3
v2.4.1 v2.4.10 v2.4.11 v2.4.12 v2.4.2
v2.4.3 v2.4.4 v2.4.5 v2.4.6 v2.4.7
v2.4.8 v2.4.9
------------
GIT
---
Part of the linkgit:git[1] suite
......@@ -17,16 +17,20 @@ SYNOPSIS
DESCRIPTION
-----------
Stores the current contents of the index in a new commit along
with a log message from the user describing the changes.
Create a new commit containing the current contents of the index and
the given log message describing the changes. The new commit is a
direct child of HEAD, usually the tip of the current branch, and the
branch is updated to point to it (unless no branch is associated with
the working tree, in which case HEAD is "detached" as described in
linkgit:git-checkout[1]).
The content to be added can be specified in several ways:
The content to be committed can be specified in several ways:
1. by using 'git add' to incrementally "add" changes to the
index before using the 'commit' command (Note: even modified
files must be "added");
1. by using linkgit:git-add[1] to incrementally "add" changes to the
index before using the 'commit' command (Note: even modified files
must be "added");
2. by using 'git rm' to remove files from the working tree
2. by using linkgit:git-rm[1] to remove files from the working tree
and the index, again before using the 'commit' command;
3. by listing files as arguments to the 'commit' command
......@@ -95,7 +99,7 @@ OPTIONS
--reset-author::
When used with -C/-c/--amend options, or when committing after a
a conflicting cherry-pick, declare that the authorship of the
conflicting cherry-pick, declare that the authorship of the
resulting commit now belongs to the committer. This also renews
the author timestamp.
......@@ -112,7 +116,7 @@ OPTIONS
`--dry-run`.
--long::
When doing a dry-run, give the output in a the long-format.
When doing a dry-run, give the output in the long-format.
Implies `--dry-run`.
-z::
......@@ -144,6 +148,8 @@ OPTIONS
Use the given <msg> as the commit message.
If multiple `-m` options are given, their values are
concatenated as separate paragraphs.
+
The `-m` option is mutually exclusive with `-c`, `-C`, and `-F`.
-t <file>::
--template=<file>::
......@@ -196,11 +202,12 @@ whitespace::
verbatim::
Do not change the message at all.
scissors::
Same as `whitespace`, except that everything from (and
including) the line
"`# ------------------------ >8 ------------------------`"
is truncated if the message is to be edited. "`#`" can be
customized with core.commentChar.
Same as `whitespace` except that everything from (and including)
the line found below is truncated, if the message is to be edited.
"`#`" can be customized with core.commentChar.
# ------------------------ >8 ------------------------
default::
Same as `strip` if the message is to be edited.
Otherwise `whitespace`.
......
This diff is collapsed.
......@@ -8,7 +8,7 @@ git-credential-cache - Helper to temporarily store passwords in memory
SYNOPSIS
--------
-----------------------------
git config credential.helper 'cache [options]'
git config credential.helper 'cache [<options>]'
-----------------------------
DESCRIPTION
......@@ -33,10 +33,13 @@ OPTIONS
--socket <path>::
Use `<path>` to contact a running cache daemon (or start a new
cache daemon if one is not started). Defaults to
`~/.git-credential-cache/socket`. If your home directory is on a
network-mounted filesystem, you may need to change this to a
local filesystem. You must specify an absolute path.
cache daemon if one is not started).
Defaults to `$XDG_CACHE_HOME/git/credential/socket` unless
`~/.git-credential-cache/` exists in which case
`~/.git-credential-cache/socket` is used instead.
If your home directory is on a network-mounted filesystem, you
may need to change this to a local filesystem. You must specify
an absolute path.
CONTROLLING THE DAEMON
----------------------
......
......@@ -8,7 +8,7 @@ git-credential-store - Helper to store credentials on disk
SYNOPSIS
--------
-------------------
git config credential.helper 'store [options]'
git config credential.helper 'store [<options>]'
-------------------
DESCRIPTION
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment