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 [show] [log-options] [<ref>] 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 33The subcommand "show" (which is also the default, in the absence of any 34subcommands) will take all the normal log options, and show the log of 35the reference provided in the command-line (or `HEAD`, by default). 36The reflog will cover all recent actions (HEAD reflog records branch switching 37as well). It is an alias for 'git log -g --abbrev-commit --pretty=oneline'; 38see gitlink:git-log[1]. 39 40The reflog is useful in various git commands, to specify the old value 41of a reference. For example, `HEAD@\{2\}` means "where HEAD used to be 42two moves ago", `master@\{one.week.ago\}` means "where master used to 43point to one week ago", and so on. See gitlink:git-rev-parse[1] for 44more details. 45 46 47OPTIONS 48------- 49 50--stale-fix:: 51 This revamps the logic -- the definition of "broken commit" 52 becomes: a commit that is not reachable from any of the refs and 53 there is a missing object among the commit, tree, or blob 54 objects reachable from it that is not reachable from any of the 55 refs. 56+ 57This computation involves traversing all the reachable objects, i.e. it 58has the same cost as 'git prune'. Fortunately, once this is run, we 59should not have to ever worry about missing objects, because the current 60prune and pack-objects know about reflogs and protect objects referred by 61them. 62 63--expire=<time>:: 64 Entries older than this time are pruned. Without the 65 option it is taken from configuration `gc.reflogExpire`, 66 which in turn defaults to 90 days. 67 68--expire-unreachable=<time>:: 69 Entries older than this time and are not reachable from 70 the current tip of the branch are pruned. Without the 71 option it is taken from configuration 72 `gc.reflogExpireUnreachable`, which in turn defaults to 73 30 days. 74 75--all:: 76 Instead of listing <refs> explicitly, prune all refs. 77 78--verbose:: 79 Print extra information on screen. 80 81Author 82------ 83Written by Junio C Hamano <junkio@cox.net> 84 85Documentation 86-------------- 87Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>. 88 89GIT 90--- 91Part of the gitlink:git[7] suite