1GIT-REFLOG(1)                     Git Manual                     GIT-REFLOG(1)
2
3
4

NAME

6       git-reflog - Manage reflog information
7

SYNOPSIS

9       git reflog <subcommand> <options>
10

DESCRIPTION

12       The command takes various subcommands, and different options depending
13       on the subcommand:
14
15           git reflog expire [--dry-run] [--stale-fix] [--verbose]
16                   [--expire=<time>] [--expire-unreachable=<time>] [--all] <refs>...
17           git reflog delete ref@{specifier}...
18           git reflog [show] [log-options] [<ref>]
19
20
21       Reflog is a mechanism to record when the tip of branches are updated.
22       This command is to manage the information recorded in it.
23
24       The subcommand "expire" is used to prune older reflog entries. Entries
25       older than expire time, or entries older than expire-unreachable time
26       and not reachable from the current tip, are removed from the reflog.
27       This is typically not used directly by the end users — instead, see
28       git-gc(1).
29
30       The subcommand "show" (which is also the default, in the absence of any
31       subcommands) will take all the normal log options, and show the log of
32       the reference provided in the command-line (or HEAD, by default). The
33       reflog will cover all recent actions (HEAD reflog records branch
34       switching as well). It is an alias for git log -g --abbrev-commit
35       --pretty=oneline; see git-log(1).
36
37       The reflog is useful in various git commands, to specify the old value
38       of a reference. For example, HEAD@{2} means "where HEAD used to be two
39       moves ago", master@{one.week.ago} means "where master used to point to
40       one week ago", and so on. See git-rev-parse(1) for more details.
41
42       To delete single entries from the reflog, use the subcommand "delete"
43       and specify the exact entry (e.g. "git reflog delete master@{2}").
44

OPTIONS

46       --stale-fix
47           This revamps the logic — the definition of "broken commit" becomes:
48           a commit that is not reachable from any of the refs and there is a
49           missing object among the commit, tree, or blob objects reachable
50           from it that is not reachable from any of the refs.
51
52           This computation involves traversing all the reachable objects,
53           i.e. it has the same cost as git prune. Fortunately, once this is
54           run, we should not have to ever worry about missing objects,
55           because the current prune and pack-objects know about reflogs and
56           protect objects referred by them.
57
58       --expire=<time>
59           Entries older than this time are pruned. Without the option it is
60           taken from configuration gc.reflogExpire, which in turn defaults to
61           90 days.
62
63       --expire-unreachable=<time>
64           Entries older than this time and not reachable from the current tip
65           of the branch are pruned. Without the option it is taken from
66           configuration gc.reflogExpireUnreachable, which in turn defaults to
67           30 days.
68
69       --all
70           Instead of listing <refs> explicitly, prune all refs.
71
72       --updateref
73           Update the ref with the sha1 of the top reflog entry (i.e.
74           <ref>@{0}) after expiring or deleting.
75
76       --rewrite
77           While expiring or deleting, adjust each reflog entry to ensure that
78           the old sha1 field points to the new sha1 field of the previous
79           entry.
80
81       --verbose
82           Print extra information on screen.
83

AUTHOR

85       Written by Junio C Hamano <gitster@pobox.com[1]>
86

DOCUMENTATION

88       Documentation by Junio C Hamano and the git-list
89       <git@vger.kernel.org[2]>.
90

GIT

92       Part of the git(1) suite
93

NOTES

95        1. gitster@pobox.com
96           mailto:gitster@pobox.com
97
98        2. git@vger.kernel.org
99           mailto:git@vger.kernel.org
100
101
102
103Git 1.7.1                         08/16/2017                     GIT-REFLOG(1)
Impressum