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
11

DESCRIPTION

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

OPTIONS

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

GIT

86       Part of the git(1) suite
87
88
89
90Git 1.8.3.1                       11/19/2018                     GIT-REFLOG(1)
Impressum