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 522 additions and 3339 deletions
GIT_VERSION = 2.12.1.431.g53026fc228
GIT_VERSION = 2.21.0
......@@ -4,9 +4,6 @@ linkgit:git-annotate[1]::
linkgit:git-blame[1]::
Show what revision and author last modified each line of a file.
linkgit:git-cherry[1]::
Find commits yet to be applied to upstream.
linkgit:git-count-objects[1]::
Count unpacked number of objects and their disk consumption.
......@@ -16,9 +13,6 @@ linkgit:git-difftool[1]::
linkgit:git-fsck[1]::
Verifies the connectivity and validity of the objects in the database.
linkgit:git-get-tar-commit-id[1]::
Extract commit ID from an archive created using git-archive.
linkgit:git-help[1]::
Display help information about Git.
......@@ -31,9 +25,6 @@ linkgit:git-merge-tree[1]::
linkgit:git-rerere[1]::
Reuse recorded resolution of conflicted merges.
linkgit:git-rev-parse[1]::
Pick out and massage parameters.
linkgit:git-show-branch[1]::
Show branches and their commits.
......
linkgit:git-archimport[1]::
Import an Arch repository into Git.
Import a GNU Arch repository into Git.
linkgit:git-cvsexportcommit[1]::
Export a single commit to a CVS checkout.
......
......@@ -76,6 +76,9 @@ linkgit:git-pull[1]::
linkgit:git-push[1]::
Update remote refs along with associated objects.
linkgit:git-range-diff[1]::
Compare two commit ranges (e.g. two versions of a branch).
linkgit:git-rebase[1]::
Reapply commits on top of another base tip.
......
linkgit:git-cat-file[1]::
Provide content or type and size information for repository objects.
linkgit:git-cherry[1]::
Find commits yet to be applied to upstream.
linkgit:git-diff-files[1]::
Compares files in the working tree and the index.
......@@ -13,6 +16,9 @@ linkgit:git-diff-tree[1]::
linkgit:git-for-each-ref[1]::
Output information on each ref.
linkgit:git-get-tar-commit-id[1]::
Extract commit ID from an archive created using git-archive.
linkgit:git-ls-files[1]::
Show information about files in the index and the working tree.
......@@ -34,6 +40,9 @@ linkgit:git-pack-redundant[1]::
linkgit:git-rev-list[1]::
Lists commit objects in reverse chronological order.
linkgit:git-rev-parse[1]::
Pick out and massage parameters.
linkgit:git-show-index[1]::
Show packed archive index.
......
......@@ -4,6 +4,9 @@ linkgit:git-apply[1]::
linkgit:git-checkout-index[1]::
Copy files from the index to the working tree.
linkgit:git-commit-graph[1]::
Write and verify Git commit-graph files.
linkgit:git-commit-tree[1]::
Create a new commit object.
......@@ -25,6 +28,9 @@ linkgit:git-mktag[1]::
linkgit:git-mktree[1]::
Build a tree-object from ls-tree formatted text.
linkgit:git-multi-pack-index[1]::
Write and verify multi-pack-indexes.
linkgit:git-pack-objects[1]::
Create a packed archive of objects.
......
This diff is collapsed.
diff.autoRefreshIndex::
When using 'git diff' to compare with work tree
files, do not consider stat-only change as changed.
Instead, silently run `git update-index --refresh` to
update the cached stat information for paths whose
contents in the work tree match the contents in the
index. This option defaults to true. Note that this
affects only 'git diff' Porcelain, and not lower level
'diff' commands such as 'git diff-files'.
diff.dirstat::
A comma separated list of `--dirstat` parameters specifying the
default behavior of the `--dirstat` option to linkgit:git-diff[1]`
and friends. The defaults can be overridden on the command line
(using `--dirstat=<param1,param2,...>`). The fallback defaults
(when not changed by `diff.dirstat`) are `changes,noncumulative,3`.
The following parameters are available:
+
--
`changes`;;
Compute the dirstat numbers by counting the lines that have been
removed from the source, or added to the destination. This ignores
the amount of pure code movements within a file. In other words,
rearranging lines in a file is not counted as much as other changes.
This is the default behavior when no parameter is given.
`lines`;;
Compute the dirstat numbers by doing the regular line-based diff
analysis, and summing the removed/added line counts. (For binary
files, count 64-byte chunks instead, since binary files have no
natural concept of lines). This is a more expensive `--dirstat`
behavior than the `changes` behavior, but it does count rearranged
lines within a file as much as other changes. The resulting output
is consistent with what you get from the other `--*stat` options.
`files`;;
Compute the dirstat numbers by counting the number of files changed.
Each changed file counts equally in the dirstat analysis. This is
the computationally cheapest `--dirstat` behavior, since it does
not have to look at the file contents at all.
`cumulative`;;
Count changes in a child directory for the parent directory as well.
Note that when using `cumulative`, the sum of the percentages
reported may exceed 100%. The default (non-cumulative) behavior can
be specified with the `noncumulative` parameter.
<limit>;;
An integer parameter specifies a cut-off percent (3% by default).
Directories contributing less than this percentage of the changes
are not shown in the output.
--
+
Example: The following will count changed files, while ignoring
directories with less than 10% of the total amount of changed files,
and accumulating child directory counts in the parent directories:
`files,10,cumulative`.
diff.statGraphWidth::
Limit the width of the graph part in --stat output. If set, applies
to all commands generating --stat output except format-patch.
diff.context::
Generate diffs with <n> lines of context instead of the default
of 3. This value is overridden by the -U option.
diff.interHunkContext::
Show the context between diff hunks, up to the specified number
of lines, thereby fusing the hunks that are close to each other.
This value serves as the default for the `--inter-hunk-context`
command line option.
diff.external::
If this config variable is set, diff generation is not
performed using the internal diff machinery, but using the
given command. Can be overridden with the `GIT_EXTERNAL_DIFF'
environment variable. The command is called with parameters
as described under "git Diffs" in linkgit:git[1]. Note: if
you want to use an external diff program only on a subset of
your files, you might want to use linkgit:gitattributes[5] instead.
diff.ignoreSubmodules::
Sets the default value of --ignore-submodules. Note that this
affects only 'git diff' Porcelain, and not lower level 'diff'
commands such as 'git diff-files'. 'git checkout' also honors
this setting when reporting uncommitted changes. Setting it to
'all' disables the submodule summary normally shown by 'git commit'
and 'git status' when `status.submoduleSummary` is set unless it is
overridden by using the --ignore-submodules command-line option.
The 'git submodule' commands are not affected by this setting.
diff.mnemonicPrefix::
If set, 'git diff' uses a prefix pair that is different from the
standard "a/" and "b/" depending on what is being compared. When
this configuration is in effect, reverse diff output also swaps
the order of the prefixes:
`git diff`;;
compares the (i)ndex and the (w)ork tree;
`git diff HEAD`;;
compares a (c)ommit and the (w)ork tree;
`git diff --cached`;;
compares a (c)ommit and the (i)ndex;
`git diff HEAD:file1 file2`;;
compares an (o)bject and a (w)ork tree entity;
`git diff --no-index a b`;;
compares two non-git things (1) and (2).
diff.noprefix::
If set, 'git diff' does not show any source or destination prefix.
diff.orderFile::
File indicating how to order files within a diff.
See the '-O' option to linkgit:git-diff[1] for details.
If `diff.orderFile` is a relative pathname, it is treated as
relative to the top of the working tree.
diff.renameLimit::
The number of files to consider when performing the copy/rename
detection; equivalent to the 'git diff' option `-l`.
diff.renames::
Whether and how Git detects renames. If set to "false",
rename detection is disabled. If set to "true", basic rename
detection is enabled. If set to "copies" or "copy", Git will
detect copies, as well. Defaults to true. Note that this
affects only 'git diff' Porcelain like linkgit:git-diff[1] and
linkgit:git-log[1], and not lower level commands such as
linkgit:git-diff-files[1].
diff.suppressBlankEmpty::
A boolean to inhibit the standard behavior of printing a space
before each empty output line. Defaults to false.
diff.submodule::
Specify the format in which differences in submodules are
shown. The "short" format just shows the names of the commits
at the beginning and end of the range. The "log" format lists
the commits in the range like linkgit:git-submodule[1] `summary`
does. The "diff" format shows an inline diff of the changed
contents of the submodule. Defaults to "short".
diff.wordRegex::
A POSIX Extended Regular Expression used to determine what is a "word"
when performing word-by-word difference calculations. Character
sequences that match the regular expression are "words", all other
characters are *ignorable* whitespace.
diff.<driver>.command::
The custom diff driver command. See linkgit:gitattributes[5]
for details.
diff.<driver>.xfuncname::
The regular expression that the diff driver should use to
recognize the hunk header. A built-in pattern may also be used.
See linkgit:gitattributes[5] for details.
diff.<driver>.binary::
Set this option to true to make the diff driver treat files as
binary. See linkgit:gitattributes[5] for details.
diff.<driver>.textconv::
The command that the diff driver should call to generate the
text-converted version of a file. The result of the
conversion is used to generate a human-readable diff. See
linkgit:gitattributes[5] for details.
diff.<driver>.wordRegex::
The regular expression that the diff driver should use to
split words in a line. See linkgit:gitattributes[5] for
details.
diff.<driver>.cachetextconv::
Set this option to true to make the diff driver cache the text
conversion outputs. See linkgit:gitattributes[5] for details.
diff.tool::
Controls which diff tool is used by linkgit:git-difftool[1].
This variable overrides the value configured in `merge.tool`.
The list below shows the valid built-in values.
Any other value is treated as a custom diff tool and requires
that a corresponding difftool.<tool>.cmd variable is defined.
include::mergetools-diff.txt[]
diff.indentHeuristic::
Set this option to `true` to enable experimental heuristics
that shift diff hunk boundaries to make patches easier to read.
diff.algorithm::
Choose a diff algorithm. The variants are as follows:
+
--
`default`, `myers`;;
The basic greedy diff algorithm. Currently, this is the default.
`minimal`;;
Spend extra time to make sure the smallest possible diff is
produced.
`patience`;;
Use "patience diff" algorithm when generating patches.
`histogram`;;
This algorithm extends the patience algorithm to "support
low-occurrence common elements".
--
+
diff.wsErrorHighlight::
A comma separated list of `old`, `new`, `context`, that
specifies how whitespace errors on lines are highlighted
with `color.diff.whitespace`. Can be overridden by the
command line option `--ws-error-highlight=<kind>`
......@@ -26,12 +26,12 @@ line per changed file.
An output line is formatted this way:
------------------------------------------------
in-place edit :100644 100644 bcd1234... 0123456... M file0
copy-edit :100644 100644 abcd123... 1234567... C68 file1 file2
rename-edit :100644 100644 abcd123... 1234567... R86 file1 file3
create :000000 100644 0000000... 1234567... A file4
delete :100644 000000 1234567... 0000000... D file5
unmerged :000000 000000 0000000... 0000000... U file6
in-place edit :100644 100644 bcd1234 0123456 M file0
copy-edit :100644 100644 abcd123 1234567 C68 file1 file2
rename-edit :100644 100644 abcd123 1234567 R86 file1 file3
create :000000 100644 0000000 1234567 A file4
delete :100644 000000 1234567 0000000 D file5
unmerged :000000 000000 0000000 0000000 U file6
------------------------------------------------
That is, from the left to the right:
......@@ -75,7 +75,7 @@ and it is out of sync with the index.
Example:
------------------------------------------------
:100644 100644 5be4a4...... 000000...... M file.c
:100644 100644 5be4a4a 0000000 M file.c
------------------------------------------------
Without the `-z` option, pathnames with "unusual" characters are
......@@ -100,7 +100,7 @@ from the format described above in the following way:
Example:
------------------------------------------------
::100644 100644 100644 fabadb8... cc95eb0... 4866510... MM describe.c
::100644 100644 100644 fabadb8 cc95eb0 4866510 MM describe.c
------------------------------------------------
Note that 'combined diff' lists only files which were modified from
......
......@@ -63,7 +63,12 @@ ifndef::git-format-patch[]
Synonym for `-p --raw`.
endif::git-format-patch[]
include::diff-heuristic-options.txt[]
--indent-heuristic::
Enable the heuristic that shifts diff hunk boundaries to make patches
easier to read. This is the default.
--no-indent-heuristic::
Disable the indent heuristic.
--minimal::
Spend extra time to make sure the smallest possible
......@@ -75,6 +80,16 @@ include::diff-heuristic-options.txt[]
--histogram::
Generate a diff using the "histogram diff" algorithm.
--anchored=<text>::
Generate a diff using the "anchored diff" algorithm.
+
This option may be specified more than once.
+
If a line exists in both the source and destination, exists only once,
and starts with this text, this algorithm attempts to prevent it from
appearing as a deletion or addition in the output. It uses the "patience
diff" algorithm internally.
--diff-algorithm={patience|minimal|histogram|myers}::
Choose a diff algorithm. The variants are as follows:
+
......@@ -91,7 +106,7 @@ include::diff-heuristic-options.txt[]
low-occurrence common elements".
--
+
For instance, if you configured diff.algorithm variable to a
For instance, if you configured the `diff.algorithm` variable to a
non-default value and want to use the default one, then you
have to use `--diff-algorithm=default` option.
......@@ -113,6 +128,14 @@ have to use `--diff-algorithm=default` option.
These parameters can also be set individually with `--stat-width=<width>`,
`--stat-name-width=<name-width>` and `--stat-count=<count>`.
--compact-summary::
Output a condensed summary of extended header information such
as file creations or deletions ("new" or "gone", optionally "+l"
if it's a symlink) and mode changes ("+x" or "-x" for adding
or removing executable bit respectively) in diffstat. The
information is put between the filename part and the graph
part. Implies `--stat`.
--numstat::
Similar to `--stat`, but shows number of added and
deleted lines in decimal notation and pathname without
......@@ -231,6 +254,81 @@ ifdef::git-diff[]
endif::git-diff[]
It is the same as `--color=never`.
--color-moved[=<mode>]::
Moved lines of code are colored differently.
ifdef::git-diff[]
It can be changed by the `diff.colorMoved` configuration setting.
endif::git-diff[]
The <mode> defaults to 'no' if the option is not given
and to 'zebra' if the option with no mode is given.
The mode must be one of:
+
--
no::
Moved lines are not highlighted.
default::
Is a synonym for `zebra`. This may change to a more sensible mode
in the future.
plain::
Any line that is added in one location and was removed
in another location will be colored with 'color.diff.newMoved'.
Similarly 'color.diff.oldMoved' will be used for removed lines
that are added somewhere else in the diff. This mode picks up any
moved line, but it is not very useful in a review to determine
if a block of code was moved without permutation.
blocks::
Blocks of moved text of at least 20 alphanumeric characters
are detected greedily. The detected blocks are
painted using either the 'color.diff.{old,new}Moved' color.
Adjacent blocks cannot be told apart.
zebra::
Blocks of moved text are detected as in 'blocks' mode. The blocks
are painted using either the 'color.diff.{old,new}Moved' color or
'color.diff.{old,new}MovedAlternative'. The change between
the two colors indicates that a new block was detected.
dimmed-zebra::
Similar to 'zebra', but additional dimming of uninteresting parts
of moved code is performed. The bordering lines of two adjacent
blocks are considered interesting, the rest is uninteresting.
`dimmed_zebra` is a deprecated synonym.
--
--no-color-moved::
Turn off move detection. This can be used to override configuration
settings. It is the same as `--color-moved=no`.
--color-moved-ws=<modes>::
This configures how whitespace is ignored when performing the
move detection for `--color-moved`.
ifdef::git-diff[]
It can be set by the `diff.colorMovedWS` configuration setting.
endif::git-diff[]
These modes can be given as a comma separated list:
+
--
no::
Do not ignore whitespace when performing move detection.
ignore-space-at-eol::
Ignore changes in whitespace at EOL.
ignore-space-change::
Ignore changes in amount of whitespace. This ignores whitespace
at line end, and considers all other sequences of one or
more whitespace characters to be equivalent.
ignore-all-space::
Ignore whitespace when comparing lines. This ignores differences
even if one line has whitespace where the other line has none.
allow-indentation-change::
Initially ignore any whitespace in the move detection, then
group the moved code blocks only into a block if the change in
whitespace is the same per line. This is incompatible with the
other modes.
--
--no-color-moved-ws::
Do not ignore whitespace when performing move detection. This can be
used to override configuration settings. It is the same as
`--color-moved-ws=no`.
--word-diff[=<mode>]::
Show a word diff, using the <mode> to delimit changed words.
By default, words are delimited by whitespace; see
......@@ -293,22 +391,21 @@ ifndef::git-format-patch[]
Warn if changes introduce conflict markers or whitespace errors.
What are considered whitespace errors is controlled by `core.whitespace`
configuration. By default, trailing whitespaces (including
lines that solely consist of whitespaces) and a space character
lines that consist solely of whitespaces) and a space character
that is immediately followed by a tab character inside the
initial indent of the line are considered whitespace errors.
Exits with non-zero status if problems are found. Not compatible
with --exit-code.
--ws-error-highlight=<kind>::
Highlight whitespace errors on lines specified by <kind>
in the color specified by `color.diff.whitespace`. <kind>
is a comma separated list of `old`, `new`, `context`. When
this option is not given, only whitespace errors in `new`
lines are highlighted. E.g. `--ws-error-highlight=new,old`
highlights whitespace errors on both deleted and added lines.
`all` can be used as a short-hand for `old,new,context`.
The `diff.wsErrorHighlight` configuration variable can be
used to specify the default behaviour.
Highlight whitespace errors in the `context`, `old` or `new`
lines of the diff. Multiple values are separated by comma,
`none` resets previous values, `default` reset the list to
`new` and `all` is a shorthand for `old,new,context`. When
this option is not given, and the configuration variable
`diff.wsErrorHighlight` is not set, only whitespace errors in
`new` lines are highlighted. The whitespace errors are colored
with `color.diff.whitespace`.
endif::git-format-patch[]
......@@ -392,7 +489,7 @@ endif::git-log[]
the diff between the preimage and `/dev/null`. The resulting patch
is not meant to be applied with `patch` or `git apply`; this is
solely for people who want to just concentrate on reviewing the
text after the change. In addition, the output obviously lack
text after the change. In addition, the output obviously lacks
enough information to apply such a patch in reverse, even manually,
hence the name of the option.
+
......@@ -421,6 +518,12 @@ ifndef::git-format-patch[]
+
Also, these upper-case letters can be downcased to exclude. E.g.
`--diff-filter=ad` excludes added and deleted paths.
+
Note that not all diffs can feature all types. For instance, diffs
from the index to the working tree can never have Added entries
(because the set of paths included in the diff is limited by what is in
the index). Similarly, copied and renamed entries cannot appear if
detection for those types is disabled.
-S<string>::
Look for differences that change the number of occurrences of
......@@ -432,6 +535,8 @@ struct), and want to know the history of that block since it first
came into being: use the feature iteratively to feed the interesting
block in the preimage back into `-S`, and keep going until you get the
very first version of the block.
+
Binary files are searched as well.
-G<regex>::
Look for differences whose patch text contains added/removed
......@@ -451,9 +556,21 @@ While `git log -G"regexec\(regexp"` will show this commit, `git log
-S"regexec\(regexp" --pickaxe-regex` will not (because the number of
occurrences of that string did not change).
+
Unless `--text` is supplied patches of binary files without a textconv
filter will be ignored.
+
See the 'pickaxe' entry in linkgit:gitdiffcore[7] for more
information.
--find-object=<object-id>::
Look for differences that change the number of occurrences of
the specified object. Similar to `-S`, just the argument is different
in that it doesn't search for a specific string but for a specific
object id.
+
The object can be a blob or a submodule commit. It implies the `-t` option in
`git-log` to also find trees.
--pickaxe-all::
When `-S` or `-G` finds a change, show all the changes in that
changeset, not just the files that contain the change
......@@ -462,6 +579,7 @@ information.
--pickaxe-regex::
Treat the <string> given to `-S` as an extended POSIX regular
expression to match.
endif::git-format-patch[]
-O<orderfile>::
......@@ -496,7 +614,7 @@ the normal order.
--
+
Patterns have the same syntax and semantics as patterns used for
fnmantch(3) without the FNM_PATHNAME flag, except a pathname also
fnmatch(3) without the FNM_PATHNAME flag, except a pathname also
matches a pattern if removing any number of the final pathname
components matches the pattern. For example, the pattern "`foo*bar`"
matches "`fooasdfbar`" and "`foo/bar/baz/asdf`" but not "`foobarx`".
......@@ -519,6 +637,9 @@ endif::git-format-patch[]
--text::
Treat all files as text.
--ignore-cr-at-eol::
Ignore carriage-return at the end of line when doing a comparison.
--ignore-space-at-eol::
Ignore changes in whitespace at EOL.
......
......@@ -42,6 +42,25 @@ the current repository has the same history as the source repository.
.git/shallow. This option updates .git/shallow and accept such
refs.
--negotiation-tip=<commit|glob>::
By default, Git will report, to the server, commits reachable
from all local refs to find common commits in an attempt to
reduce the size of the to-be-received packfile. If specified,
Git will only report commits reachable from the given tips.
This is useful to speed up fetches when the user knows which
local ref is likely to have commits in common with the
upstream ref being fetched.
+
This option may be specified more than once; if so, Git will report
commits reachable from any of the given commits.
+
The argument to this option may be a glob on ref names, a ref, or the (possibly
abbreviated) SHA-1 of a commit. Specifying a glob is equivalent to specifying
this option multiple times, one for each matching ref name.
+
See also the `fetch.negotiationAlgorithm` configuration variable
documented in linkgit:git-config[1].
ifndef::git-pull[]
--dry-run::
Show what would be done, without making any changes.
......@@ -49,11 +68,16 @@ endif::git-pull[]
-f::
--force::
When 'git fetch' is used with `<rbranch>:<lbranch>`
refspec, it refuses to update the local branch
`<lbranch>` unless the remote branch `<rbranch>` it
fetches is a descendant of `<lbranch>`. This option
overrides that check.
When 'git fetch' is used with `<src>:<dst>` refspec it may
refuse to update the local branch as discussed
ifdef::git-pull[]
in the `<refspec>` part of the linkgit:git-fetch[1]
documentation.
endif::git-pull[]
ifndef::git-pull[]
in the `<refspec>` part below.
endif::git-pull[]
This option overrides that check.
-k::
--keep::
......@@ -73,7 +97,22 @@ ifndef::git-pull[]
are fetched due to an explicit refspec (either on the command
line or in the remote configuration, for example if the remote
was cloned with the --mirror option), then they are also
subject to pruning.
subject to pruning. Supplying `--prune-tags` is a shorthand for
providing the tag refspec.
+
See the PRUNING section below for more details.
-P::
--prune-tags::
Before fetching, remove any local tags that no longer exist on
the remote if `--prune` is enabled. This option should be used
more carefully, unlike `--prune` it will remove any local
references (local tags) that have been created. This option is
a shorthand for providing the explicit tag refspec along with
`--prune`, see the discussion about that in its documentation.
+
See the PRUNING section below for more details.
endif::git-pull[]
ifndef::git-pull[]
......@@ -173,6 +212,14 @@ endif::git-pull[]
is specified. This flag forces progress status even if the
standard error stream is not directed to a terminal.
-o <option>::
--server-option=<option>::
Transmit the given string to the server when communicating using
protocol version 2. The given string must not contain a NUL or LF
character.
When multiple `--server-option=<option>` are given, they are all
sent to the other side in the order listed on the command line.
-4::
--ipv4::
Use IPv4 addresses only, ignoring IPv6 addresses.
......
merge.branchdesc::
In addition to branch names, populate the log message with
the branch description text associated with them. Defaults
to false.
merge.log::
In addition to branch names, populate the log message with at
most the specified number of one-line descriptions from the
actual commits that are being merged. Defaults to false, and
true is a synonym for 20.
......@@ -10,7 +10,7 @@ SYNOPSIS
[verse]
'git add' [--verbose | -v] [--dry-run | -n] [--force | -f] [--interactive | -i] [--patch | -p]
[--edit | -e] [--[no-]all | --[no-]ignore-removal | [--update | -u]]
[--intent-to-add | -N] [--refresh] [--ignore-errors] [--ignore-missing]
[--intent-to-add | -N] [--refresh] [--ignore-errors] [--ignore-missing] [--renormalize]
[--chmod=(+|-)x] [--] [<pathspec>...]
DESCRIPTION
......@@ -61,6 +61,9 @@ OPTIONS
the working tree). Note that older versions of Git used
to ignore removed files; use `--no-all` option if you want
to add modified or new files but ignore removed ones.
+
For more details about the <pathspec> syntax, see the 'pathspec' entry
in linkgit:gitglossary[7].
-n::
--dry-run::
......@@ -165,6 +168,20 @@ for "git add --no-all <pathspec>...", i.e. ignored removed files.
be ignored, no matter if they are already present in the work
tree or not.
--no-warn-embedded-repo::
By default, `git add` will warn when adding an embedded
repository to the index without using `git submodule add` to
create an entry in `.gitmodules`. This option will suppress the
warning (e.g., if you are manually performing operations on
submodules).
--renormalize::
Apply the "clean" process freshly to all tracked files to
forcibly add them again to the index. This is useful after
changing `core.autocrlf` configuration or the `text` attribute
in order to correct files added with wrong CRLF/LF line endings.
This option implies `-u`.
--chmod=(+|-)x::
Override the executable bit of the added files. The executable
bit is only changed in the index, the files on disk are left
......@@ -176,7 +193,7 @@ for "git add --no-all <pathspec>...", i.e. ignored removed files.
for command-line options).
Configuration
CONFIGURATION
-------------
The optional configuration variable `core.excludesFile` indicates a path to a
......@@ -209,7 +226,7 @@ Because this example lets the shell expand the asterisk (i.e. you are
listing the files explicitly), it does not consider
`subdir/git-foo.sh`.
Interactive mode
INTERACTIVE MODE
----------------
When the command enters the interactive mode, it shows the
output of the 'status' subcommand, and then goes into its
......
......@@ -16,7 +16,7 @@ SYNOPSIS
[--exclude=<path>] [--include=<path>] [--reject] [-q | --quiet]
[--[no-]scissors] [-S[<keyid>]] [--patch-format=<format>]
[(<mbox> | <Maildir>)...]
'git am' (--continue | --skip | --abort)
'git am' (--continue | --skip | --abort | --quit | --show-current-patch)
DESCRIPTION
-----------
......@@ -167,6 +167,14 @@ default. You can use `--no-utf8` to override this.
--abort::
Restore the original branch and abort the patching operation.
--quit::
Abort the patching operation but keep HEAD and the index
untouched.
--show-current-patch::
Show the patch being applied when "git am" is stopped because
of conflicts.
DISCUSSION
----------
......
......@@ -8,7 +8,7 @@ git-annotate - Annotate file lines with commit information
SYNOPSIS
--------
[verse]
'git annotate' [options] file [revision]
'git annotate' [<options>] <file> [<revision>]
DESCRIPTION
-----------
......@@ -23,7 +23,6 @@ familiar command name for people coming from other SCM systems.
OPTIONS
-------
include::blame-options.txt[]
include::diff-heuristic-options.txt[]
SEE ALSO
--------
......
......@@ -9,7 +9,7 @@ git-apply - Apply a patch to files and/or to the index
SYNOPSIS
--------
[verse]
'git apply' [--stat] [--numstat] [--summary] [--check] [--index] [--3way]
'git apply' [--stat] [--numstat] [--summary] [--check] [--index | --intent-to-add] [--3way]
[--apply] [--no-add] [--build-fake-ancestor=<file>] [-R | --reverse]
[--allow-binary-replacement | --binary] [--reject] [-z]
[-p<n>] [-C<n>] [--inaccurate-eof] [--recount] [--cached]
......@@ -66,7 +66,7 @@ OPTIONS
disables it is in effect), make sure the patch is
applicable to what the current index file records. If
the file to be patched in the working tree is not
up-to-date, it is flagged as an error. This flag also
up to date, it is flagged as an error. This flag also
causes the index file to be updated.
--cached::
......@@ -74,6 +74,14 @@ OPTIONS
cached data, apply the patch, and store the result in the index
without using the working tree. This implies `--index`.
--intent-to-add::
When applying the patch only to the working tree, mark new
files to be added to the index later (see `--intent-to-add`
option in linkgit:git-add[1]). This option is ignored unless
running in a Git repository and `--index` is not specified.
Note that `--index` could be implied by other options such
as `--cached` or `--3way`.
-3::
--3way::
When the patch does not apply cleanly, fall back on 3-way merge if
......@@ -113,8 +121,10 @@ explained for the configuration variable `core.quotePath` (see
linkgit:git-config[1]).
-p<n>::
Remove <n> leading slashes from traditional diff paths. The
default is 1.
Remove <n> leading path components (separated by slashes) from
traditional diff paths. E.g., with `-p2`, a patch against
`a/dir/file` will be applied directly to `file`. The default is
1.
-C<n>::
Ensure at least <n> lines of surrounding context match before
......@@ -240,7 +250,7 @@ When `git apply` is used as a "better GNU patch", the user can pass
the `--unsafe-paths` option to override this safety check. This option
has no effect when `--index` or `--cached` is in use.
Configuration
CONFIGURATION
-------------
apply.ignoreWhitespace::
......@@ -251,7 +261,7 @@ apply.whitespace::
When no `--whitespace` flag is given from the command
line, this configuration item is used as the default.
Submodules
SUBMODULES
----------
If the patch contains any changes to submodules then 'git apply'
treats these changes as follows.
......@@ -259,7 +269,7 @@ treats these changes as follows.
If `--index` is specified (explicitly or implicitly), then the submodule
commits must match the index exactly for the patch to apply. If any
of the submodules are checked-out, then these check-outs are completely
ignored, i.e., they are not required to be up-to-date or clean and they
ignored, i.e., they are not required to be up to date or clean and they
are not updated.
If `--index` is not specified, then the submodule commits in the patch
......
......@@ -3,7 +3,7 @@ git-archimport(1)
NAME
----
git-archimport - Import an Arch repository into Git
git-archimport - Import a GNU Arch repository into Git
SYNOPSIS
......@@ -14,7 +14,8 @@ SYNOPSIS
DESCRIPTION
-----------
Imports a project from one or more Arch repositories. It will follow branches
Imports a project from one or more GNU Arch repositories.
It will follow branches
and repositories within the namespaces defined by the <archive/branch>
parameters supplied. If it cannot find the remote branch a merge comes from
it will just import it as a regular commit. If it can find it, it will mark it
......@@ -96,7 +97,7 @@ OPTIONS
pruned.
-a::
Attempt to auto-register archives at http://mirrors.sourcecontrol.net
Attempt to auto-register archives at `http://mirrors.sourcecontrol.net`
This is particularly useful with the -D option.
-t <tmpdir>::
......
......@@ -23,7 +23,7 @@ on the subcommand:
git bisect terms [--term-good | --term-bad]
git bisect skip [(<rev>|<range>)...]
git bisect reset [<commit>]
git bisect visualize
git bisect (visualize|view)
git bisect replay <logfile>
git bisect log
git bisect run <cmd>...
......@@ -137,7 +137,7 @@ respectively, in place of "good" and "bad". (But note that you cannot
mix "good" and "bad" with "old" and "new" in a single session.)
In this more general usage, you provide `git bisect` with a "new"
commit has some property and an "old" commit that doesn't have that
commit that has some property and an "old" commit that doesn't have that
property. Each time `git bisect` checks out a commit, you test if that
commit has the property. If it does, mark the commit as "new";
otherwise, mark it as "old". When the bisection is done, `git bisect`
......@@ -165,8 +165,8 @@ To get a reminder of the currently used terms, use
git bisect terms
------------------------------------------------
You can get just the old (respectively new) term with `git bisect term
--term-old` or `git bisect term --term-good`.
You can get just the old (respectively new) term with `git bisect terms
--term-old` or `git bisect terms --term-good`.
If you would like to use your own terms instead of "bad"/"good" or
"new"/"old", you can choose any names you like (except existing bisect
......@@ -193,24 +193,23 @@ git bisect start --term-new fixed --term-old broken
Then, use `git bisect <term-old>` and `git bisect <term-new>` instead
of `git bisect good` and `git bisect bad` to mark commits.
Bisect visualize
~~~~~~~~~~~~~~~~
Bisect visualize/view
~~~~~~~~~~~~~~~~~~~~~
To see the currently remaining suspects in 'gitk', issue the following
command during the bisection process:
command during the bisection process (the subcommand `view` can be used
as an alternative to `visualize`):
------------
$ git bisect visualize
------------
`view` may also be used as a synonym for `visualize`.
If the `DISPLAY` environment variable is not set, 'git log' is used
instead. You can also give command-line options such as `-p` and
`--stat`.
------------
$ git bisect view --stat
$ git bisect visualize --stat
------------
Bisect log and bisect replay
......
......@@ -89,8 +89,6 @@ include::blame-options.txt[]
abbreviated object name, use <n>+1 digits. Note that 1 column
is used for a caret to mark the boundary commit.
include::diff-heuristic-options.txt[]
THE PORCELAIN FORMAT
--------------------
......
......@@ -10,13 +10,15 @@ SYNOPSIS
[verse]
'git branch' [--color[=<when>] | --no-color] [-r | -a]
[--list] [-v [--abbrev=<length> | --no-abbrev]]
[--column[=<options>] | --no-column]
[(--merged | --no-merged | --contains) [<commit>]] [--sort=<key>]
[--column[=<options>] | --no-column] [--sort=<key>]
[(--merged | --no-merged) [<commit>]]
[--contains [<commit]] [--no-contains [<commit>]]
[--points-at <object>] [--format=<format>] [<pattern>...]
'git branch' [--set-upstream | --track | --no-track] [-l] [-f] <branchname> [<start-point>]
'git branch' [--track | --no-track] [-f] <branchname> [<start-point>]
'git branch' (--set-upstream-to=<upstream> | -u <upstream>) [<branchname>]
'git branch' --unset-upstream [<branchname>]
'git branch' (-m | -M) [<oldbranch>] <newbranch>
'git branch' (-c | -C) [<oldbranch>] <newbranch>
'git branch' (-d | -D) [-r] <branchname>...
'git branch' --edit-description [<branchname>]
......@@ -35,11 +37,12 @@ as branch creation.
With `--contains`, shows only the branches that contain the named commit
(in other words, the branches whose tip commits are descendants of the
named commit). With `--merged`, only branches merged into the named
commit (i.e. the branches whose tip commits are reachable from the named
commit) will be listed. With `--no-merged` only branches not merged into
the named commit will be listed. If the <commit> argument is missing it
defaults to `HEAD` (i.e. the tip of the current branch).
named commit), `--no-contains` inverts it. With `--merged`, only branches
merged into the named commit (i.e. the branches whose tip commits are
reachable from the named commit) will be listed. With `--no-merged` only
branches not merged into the named commit will be listed. If the <commit>
argument is missing it defaults to `HEAD` (i.e. the tip of the current
branch).
The command's second form creates a new branch head named <branchname>
which points to the current `HEAD`, or <start-point> if given.
......@@ -62,6 +65,10 @@ If <oldbranch> had a corresponding reflog, it is renamed to match
renaming. If <newbranch> exists, -M must be used to force the rename
to happen.
The `-c` and `-C` options have the exact same semantics as `-m` and
`-M`, except instead of the branch being renamed it along with its
config and reflog will be copied to a new name.
With a `-d` or `-D` option, `<branchname>` will be deleted. You may
specify more than one branch for deletion. If the branch currently
has a reflog then the reflog will also be deleted.
......@@ -79,30 +86,29 @@ OPTIONS
--delete::
Delete a branch. The branch must be fully merged in its
upstream branch, or in `HEAD` if no upstream was set with
`--track` or `--set-upstream`.
`--track` or `--set-upstream-to`.
-D::
Shortcut for `--delete --force`.
-l::
--create-reflog::
Create the branch's reflog. This activates recording of
all changes made to the branch ref, enabling use of date
based sha1 expressions such as "<branchname>@\{yesterday}".
Note that in non-bare repositories, reflogs are usually
enabled by default by the `core.logallrefupdates` config option.
enabled by default by the `core.logAllRefUpdates` config option.
The negated form `--no-create-reflog` only overrides an earlier
`--create-reflog`, but currently does not negate the setting of
`core.logallrefupdates`.
`core.logAllRefUpdates`.
-f::
--force::
Reset <branchname> to <startpoint> if <branchname> exists
already. Without `-f` 'git branch' refuses to change an existing branch.
Reset <branchname> to <startpoint>, even if <branchname> exists
already. Without `-f`, 'git branch' refuses to change an existing branch.
In combination with `-d` (or `--delete`), allow deleting the
branch irrespective of its merged status. In combination with
`-m` (or `--move`), allow renaming the branch even if the new
branch name already exists.
branch name already exists, the same applies for `-c` (or `--copy`).
-m::
--move::
......@@ -111,6 +117,13 @@ OPTIONS
-M::
Shortcut for `--move --force`.
-c::
--copy::
Copy a branch and the corresponding reflog.
-C::
Shortcut for `--copy --force`.
--color[=<when>]::
Color branches to highlight current, local, and
remote-tracking branches.
......@@ -141,9 +154,11 @@ This option is only applicable in non-verbose mode.
--all::
List both remote-tracking branches and local branches.
-l::
--list::
Activate the list mode. `git branch <pattern>` would try to create a branch,
use `git branch --list <pattern>` to list matching branches.
List branches. With optional `<pattern>...`, e.g. `git
branch --list 'maint-*'`, list only the branches that match
the pattern(s).
-v::
-vv::
......@@ -188,10 +203,8 @@ start-point is either a local or remote-tracking branch.
branch.autoSetupMerge configuration variable is true.
--set-upstream::
If specified branch does not exist yet or if `--force` has been
given, acts exactly like `--track`. Otherwise sets up configuration
like `--track` would when creating the branch, except that where
branch points to is not changed.
As this option had confusing syntax, it is no longer supported.
Please use `--track` or `--set-upstream-to` instead.
-u <upstream>::
--set-upstream-to=<upstream>::
......@@ -213,13 +226,19 @@ start-point is either a local or remote-tracking branch.
Only list branches which contain the specified commit (HEAD
if not specified). Implies `--list`.
--no-contains [<commit>]::
Only list branches which don't contain the specified commit
(HEAD if not specified). Implies `--list`.
--merged [<commit>]::
Only list branches whose tips are reachable from the
specified commit (HEAD if not specified). Implies `--list`.
specified commit (HEAD if not specified). Implies `--list`,
incompatible with `--no-merged`.
--no-merged [<commit>]::
Only list branches whose tips are not reachable from the
specified commit (HEAD if not specified). Implies `--list`.
specified commit (HEAD if not specified). Implies `--list`,
incompatible with `--merged`.
<branchname>::
The name of the branch to create or delete.
......@@ -244,21 +263,28 @@ start-point is either a local or remote-tracking branch.
order of the value. You may use the --sort=<key> option
multiple times, in which case the last key becomes the primary
key. The keys supported are the same as those in `git
for-each-ref`. Sort order defaults to sorting based on the
for-each-ref`. Sort order defaults to the value configured for the
`branch.sort` variable if exists, or to sorting based on the
full refname (including `refs/...` prefix). This lists
detached HEAD (if present) first, then local branches and
finally remote-tracking branches.
finally remote-tracking branches. See linkgit:git-config[1].
--points-at <object>::
Only list branches of the given object.
--format <format>::
A string that interpolates `%(fieldname)` from the object
pointed at by a ref being shown. The format is the same as
A string that interpolates `%(fieldname)` from a branch ref being shown
and the object it points at. The format is the same as
that of linkgit:git-for-each-ref[1].
Examples
CONFIGURATION
-------------
`pager.branch` is only respected when listing branches, i.e., when
`--list` is used or implied. The default is to use a pager.
See linkgit:git-config[1].
EXAMPLES
--------
Start development from a known tag::
......@@ -271,7 +297,7 @@ $ git checkout my2.6.14
------------
+
<1> This step and the next one could be combined into a single step with
"checkout -b my2.6.14 v2.6.14".
"checkout -b my2.6.14 v2.6.14".
Delete an unneeded branch::
+
......@@ -283,26 +309,29 @@ $ git branch -D test <2>
------------
+
<1> Delete the remote-tracking branches "todo", "html" and "man". The next
'fetch' or 'pull' will create them again unless you configure them not to.
See linkgit:git-fetch[1].
'fetch' or 'pull' will create them again unless you configure them not to.
See linkgit:git-fetch[1].
<2> Delete the "test" branch even if the "master" branch (or whichever branch
is currently checked out) does not have all commits from the test branch.
is currently checked out) does not have all commits from the test branch.
Notes
NOTES
-----
If you are creating a branch that you want to checkout immediately, it is
easier to use the git checkout command with its `-b` option to create
a branch and check it out with a single command.
The options `--contains`, `--merged` and `--no-merged` serve three related
but different purposes:
The options `--contains`, `--no-contains`, `--merged` and `--no-merged`
serve four related but different purposes:
- `--contains <commit>` is used to find all branches which will need
special attention if <commit> were to be rebased or amended, since those
branches contain the specified <commit>.
- `--no-contains <commit>` is the inverse of that, i.e. branches that don't
contain the specified <commit>.
- `--merged` is used to find all branches which can be safely deleted,
since those branches are fully contained by HEAD.
......
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