Merge branch 'js/reflog-delete'
* js/reflog-delete: t3903-stash.sh: Add tests for new stash commands drop and pop git-reflog.txt: Document new commands --updateref and --rewrite t3903-stash.sh: Add missing '&&' to body of testcase git-stash: add new 'pop' subcommand git-stash: add new 'drop' subcommand git-reflog: add option --updateref to write the last reflog sha1 into the ref refs.c: make close_ref() and commit_ref() non-static git-reflog: add option --rewrite to update reflog entries while expiring reflog-delete: parse standard reflog options builtin-reflog.c: fix typo that accesses an unset variable Teach "git reflog" a subcommand to delete single entries
This commit is contained in:
@ -19,6 +19,8 @@ depending on the subcommand:
|
||||
git reflog expire [--dry-run] [--stale-fix] [--verbose]
|
||||
[--expire=<time>] [--expire-unreachable=<time>] [--all] <refs>...
|
||||
|
||||
git reflog delete ref@\{specifier\}...
|
||||
|
||||
git reflog [show] [log-options] [<ref>]
|
||||
|
||||
Reflog is a mechanism to record when the tip of branches are
|
||||
@ -43,6 +45,9 @@ two moves ago", `master@\{one.week.ago\}` means "where master used to
|
||||
point to one week ago", and so on. See linkgit:git-rev-parse[1] for
|
||||
more details.
|
||||
|
||||
To delete single entries from the reflog, use the subcommand "delete"
|
||||
and specify the _exact_ entry (e.g. ``git reflog delete master@\{2\}'').
|
||||
|
||||
|
||||
OPTIONS
|
||||
-------
|
||||
@ -75,6 +80,15 @@ them.
|
||||
--all::
|
||||
Instead of listing <refs> explicitly, prune all refs.
|
||||
|
||||
--updateref::
|
||||
Update the ref with the sha1 of the top reflog entry (i.e.
|
||||
<ref>@\{0\}) after expiring or deleting.
|
||||
|
||||
--rewrite::
|
||||
While expiring or deleting, adjust each reflog entry to ensure
|
||||
that the `old` sha1 field points to the `new` sha1 field of the
|
||||
previous entry.
|
||||
|
||||
--verbose::
|
||||
Print extra information on screen.
|
||||
|
||||
|
@ -8,7 +8,7 @@ git-stash - Stash the changes in a dirty working directory away
|
||||
SYNOPSIS
|
||||
--------
|
||||
[verse]
|
||||
'git-stash' (list | show [<stash>] | apply [<stash>] | clear)
|
||||
'git-stash' (list | show [<stash>] | apply [<stash>] | clear | drop [<stash>] | pop [<stash>])
|
||||
'git-stash' [save [<message>]]
|
||||
|
||||
DESCRIPTION
|
||||
@ -85,6 +85,17 @@ clear::
|
||||
Remove all the stashed states. Note that those states will then
|
||||
be subject to pruning, and may be difficult or impossible to recover.
|
||||
|
||||
drop [<stash>]::
|
||||
|
||||
Remove a single stashed state from the stash list. When no `<stash>`
|
||||
is given, it removes the latest one. i.e. `stash@\{0}`
|
||||
|
||||
pop [<stash>]::
|
||||
|
||||
Remove a single stashed state from the stash list and apply on top
|
||||
of the current working tree state. When no `<stash>` is given,
|
||||
`stash@\{0}` is assumed. See also `apply`.
|
||||
|
||||
|
||||
DISCUSSION
|
||||
----------
|
||||
|
Reference in New Issue
Block a user