]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-reflog.txt
config: clarify compression defaults
[thirdparty/git.git] / Documentation / git-reflog.txt
CommitLineData
4aec56d1
JH
1git-reflog(1)
2=============
3
4NAME
5----
6git-reflog - Manage reflog information
7
8
9SYNOPSIS
10--------
cf39f54e 11'git reflog' <subcommand> <options>
4aec56d1
JH
12
13DESCRIPTION
14-----------
cf39f54e
LT
15The command takes various subcommands, and different options
16depending on the subcommand:
17
18[verse]
a5d41015 19git reflog expire [--dry-run] [--stale-fix] [--verbose]
cf39f54e
LT
20 [--expire=<time>] [--expire-unreachable=<time>] [--all] <refs>...
21
22git reflog [show] [log-options]
4aec56d1
JH
23
24Reflog is a mechanism to record when the tip of branches are
25updated. This command is to manage the information recorded in it.
26
27The subcommand "expire" is used to prune older reflog entries.
28Entries older than `expire` time, or entries older than
29`expire-unreachable` time and are not reachable from the current
30tip, are removed from the reflog. This is typically not used
31directly by the end users -- instead, see gitlink:git-gc[1].
32
02783075 33The subcommand "show" (which is also the default, in the absence of any
cf39f54e 34subcommands) will take all the normal log options, and show the log of
95064cbc
SP
35`HEAD`, which will cover all recent actions, including branch switches.
36It is basically an alias for 'git log -g --abbrev-commit
cf39f54e 37--pretty=oneline', see gitlink:git-log[1].
4aec56d1
JH
38
39
40OPTIONS
41-------
42
cb877cd7
JN
43--stale-fix::
44 This revamps the logic -- the definition of "broken commit"
45 becomes: a commit that is not reachable from any of the refs and
46 there is a missing object among the commit, tree, or blob
47 objects reachable from it that is not reachable from any of the
48 refs.
49+
50This computation involves traversing all the reachable objects, i.e. it
51has the same cost as 'git prune'. Fortunately, once this is run, we
52should not have to ever worry about missing objects, because the current
53prune and pack-objects know about reflogs and protect objects referred by
54them.
55
4aec56d1
JH
56--expire=<time>::
57 Entries older than this time are pruned. Without the
58 option it is taken from configuration `gc.reflogExpire`,
59 which in turn defaults to 90 days.
60
61--expire-unreachable=<time>::
62 Entries older than this time and are not reachable from
63 the current tip of the branch are pruned. Without the
64 option it is taken from configuration
65 `gc.reflogExpireUnreachable`, which in turn defaults to
66 30 days.
67
68--all::
69 Instead of listing <refs> explicitly, prune all refs.
70
a5d41015
MB
71--verbose::
72 Print extra information on screen.
73
4aec56d1
JH
74Author
75------
76Written by Junio C Hamano <junkio@cox.net>
77
78Documentation
79--------------
80Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
81
82GIT
83---
84Part of the gitlink:git[7] suite