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