mirror of
https://github.com/git/git
synced 2024-08-25 02:35:46 +00:00
Merge branch 'vh/config-interactive-singlekey-doc' into maint
* vh/config-interactive-singlekey-doc: git-reset.txt: better docs for '--patch' git-checkout.txt: better docs for '--patch' git-stash.txt: better docs for '--patch' git-add.txt: document 'interactive.singlekey' config.txt: 'interactive.singlekey; is used by...
This commit is contained in:
commit
398dbe536d
|
@ -1307,8 +1307,9 @@ instaweb.port::
|
||||||
interactive.singlekey::
|
interactive.singlekey::
|
||||||
In interactive commands, allow the user to provide one-letter
|
In interactive commands, allow the user to provide one-letter
|
||||||
input with a single key (i.e., without hitting enter).
|
input with a single key (i.e., without hitting enter).
|
||||||
Currently this is used only by the `\--patch` mode of
|
Currently this is used by the `\--patch` mode of
|
||||||
linkgit:git-add[1]. Note that this setting is silently
|
linkgit:git-add[1], linkgit:git-reset[1], linkgit:git-stash[1] and
|
||||||
|
linkgit:git-checkout[1]. Note that this setting is silently
|
||||||
ignored if portable keystroke input is not available.
|
ignored if portable keystroke input is not available.
|
||||||
|
|
||||||
log.date::
|
log.date::
|
||||||
|
|
|
@ -274,7 +274,8 @@ patch::
|
||||||
This lets you choose one path out of a 'status' like selection.
|
This lets you choose one path out of a 'status' like selection.
|
||||||
After choosing the path, it presents the diff between the index
|
After choosing the path, it presents the diff between the index
|
||||||
and the working tree file and asks you if you want to stage
|
and the working tree file and asks you if you want to stage
|
||||||
the change of each hunk. You can say:
|
the change of each hunk. You can select one of the following
|
||||||
|
options and type return:
|
||||||
|
|
||||||
y - stage this hunk
|
y - stage this hunk
|
||||||
n - do not stage this hunk
|
n - do not stage this hunk
|
||||||
|
@ -293,6 +294,9 @@ patch::
|
||||||
+
|
+
|
||||||
After deciding the fate for all hunks, if there is any hunk
|
After deciding the fate for all hunks, if there is any hunk
|
||||||
that was chosen, the index is updated with the selected hunks.
|
that was chosen, the index is updated with the selected hunks.
|
||||||
|
+
|
||||||
|
You can omit having to type return here, by setting the configuration
|
||||||
|
variable `interactive.singlekey` to `true`.
|
||||||
|
|
||||||
diff::
|
diff::
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ SYNOPSIS
|
||||||
'git checkout' [-q] [-f] [-m] [--detach] [<commit>]
|
'git checkout' [-q] [-f] [-m] [--detach] [<commit>]
|
||||||
'git checkout' [-q] [-f] [-m] [[-b|-B|--orphan] <new_branch>] [<start_point>]
|
'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' [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>...
|
||||||
'git checkout' --patch [<tree-ish>] [--] [<paths>...]
|
'git checkout' [-p|--patch] [<tree-ish>] [--] [<paths>...]
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
-----------
|
-----------
|
||||||
|
@ -45,7 +45,7 @@ $ git checkout <branch>
|
||||||
that is to say, the branch is not reset/created unless "git checkout" is
|
that is to say, the branch is not reset/created unless "git checkout" is
|
||||||
successful.
|
successful.
|
||||||
|
|
||||||
'git checkout' [--patch] [<tree-ish>] [--] <pathspec>...::
|
'git checkout' [-p|--patch] [<tree-ish>] [--] <pathspec>...::
|
||||||
|
|
||||||
When <paths> or `--patch` are given, 'git checkout' does *not*
|
When <paths> or `--patch` are given, 'git checkout' does *not*
|
||||||
switch branches. It updates the named paths in the working tree
|
switch branches. It updates the named paths in the working tree
|
||||||
|
@ -183,7 +183,8 @@ the conflicted merge in the specified paths.
|
||||||
working tree (and if a <tree-ish> was specified, the index).
|
working tree (and if a <tree-ish> was specified, the index).
|
||||||
+
|
+
|
||||||
This means that you can use `git checkout -p` to selectively discard
|
This means that you can use `git checkout -p` to selectively discard
|
||||||
edits from your current working tree.
|
edits from your current working tree. See the ``Interactive Mode''
|
||||||
|
section of linkgit:git-add[1] to learn how to operate the `\--patch` mode.
|
||||||
|
|
||||||
<branch>::
|
<branch>::
|
||||||
Branch to checkout; if it refers to a branch (i.e., a name that,
|
Branch to checkout; if it refers to a branch (i.e., a name that,
|
||||||
|
|
|
@ -9,7 +9,7 @@ SYNOPSIS
|
||||||
--------
|
--------
|
||||||
[verse]
|
[verse]
|
||||||
'git reset' [-q] [<commit>] [--] <paths>...
|
'git reset' [-q] [<commit>] [--] <paths>...
|
||||||
'git reset' --patch [<commit>] [--] [<paths>...]
|
'git reset' [--patch|-p] [<commit>] [--] [<paths>...]
|
||||||
'git reset' [--soft | --mixed | --hard | --merge | --keep] [-q] [<commit>]
|
'git reset' [--soft | --mixed | --hard | --merge | --keep] [-q] [<commit>]
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
|
@ -39,8 +39,9 @@ working tree in one go.
|
||||||
and <commit> (defaults to HEAD). The chosen hunks are applied
|
and <commit> (defaults to HEAD). The chosen hunks are applied
|
||||||
in reverse to the index.
|
in reverse to the index.
|
||||||
+
|
+
|
||||||
This means that `git reset -p` is the opposite of `git add -p` (see
|
This means that `git reset -p` is the opposite of `git add -p`, i.e.
|
||||||
linkgit:git-add[1]).
|
you can use it to selectively reset hunks. See the ``Interactive Mode''
|
||||||
|
section of linkgit:git-add[1] to learn how to operate the `\--patch` mode.
|
||||||
|
|
||||||
'git reset' [--<mode>] [<commit>]::
|
'git reset' [--<mode>] [<commit>]::
|
||||||
This form resets the current branch head to <commit> and
|
This form resets the current branch head to <commit> and
|
||||||
|
|
|
@ -13,7 +13,7 @@ SYNOPSIS
|
||||||
'git stash' drop [-q|--quiet] [<stash>]
|
'git stash' drop [-q|--quiet] [<stash>]
|
||||||
'git stash' ( pop | apply ) [--index] [-q|--quiet] [<stash>]
|
'git stash' ( pop | apply ) [--index] [-q|--quiet] [<stash>]
|
||||||
'git stash' branch <branchname> [<stash>]
|
'git stash' branch <branchname> [<stash>]
|
||||||
'git stash' [save [--patch] [-k|--[no-]keep-index] [-q|--quiet] [<message>]]
|
'git stash' [save [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet] [<message>]]
|
||||||
'git stash' clear
|
'git stash' clear
|
||||||
'git stash' create
|
'git stash' create
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ is also possible).
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-------
|
-------
|
||||||
|
|
||||||
save [--patch] [--[no-]keep-index] [-q|--quiet] [<message>]::
|
save [-p|--patch] [--[no-]keep-index] [-q|--quiet] [<message>]::
|
||||||
|
|
||||||
Save your local modifications to a new 'stash', and run `git reset
|
Save your local modifications to a new 'stash', and run `git reset
|
||||||
--hard` to revert them. The <message> part is optional and gives
|
--hard` to revert them. The <message> part is optional and gives
|
||||||
|
@ -54,12 +54,13 @@ save [--patch] [--[no-]keep-index] [-q|--quiet] [<message>]::
|
||||||
If the `--keep-index` option is used, all changes already added to the
|
If the `--keep-index` option is used, all changes already added to the
|
||||||
index are left intact.
|
index are left intact.
|
||||||
+
|
+
|
||||||
With `--patch`, you can interactively select hunks from in the diff
|
With `--patch`, you can interactively select hunks from the diff
|
||||||
between HEAD and the working tree to be stashed. The stash entry is
|
between HEAD and the working tree to be stashed. The stash entry is
|
||||||
constructed such that its index state is the same as the index state
|
constructed such that its index state is the same as the index state
|
||||||
of your repository, and its worktree contains only the changes you
|
of your repository, and its worktree contains only the changes you
|
||||||
selected interactively. The selected changes are then rolled back
|
selected interactively. The selected changes are then rolled back
|
||||||
from your worktree.
|
from your worktree. See the ``Interactive Mode'' section of
|
||||||
|
linkgit:git-add[1] to learn how to operate the `\--patch` mode.
|
||||||
+
|
+
|
||||||
The `--patch` option implies `--keep-index`. You can use
|
The `--patch` option implies `--keep-index`. You can use
|
||||||
`--no-keep-index` to override this.
|
`--no-keep-index` to override this.
|
||||||
|
|
Loading…
Reference in a new issue