How do I set gc.reflogExpire so that items will never expire?
What other time interval formats does it accept?
The man page says that you can set it to "90 days or 3 months," but doesn't specify what format it expects.
git prune is used to remove Git objects that have been deemed inaccessible by the git gc configuration.
auto below for how to disable this behavior. Running git gc manually should only be needed when adding objects to a repository without regularly running such porcelain commands, to do a one-off repository optimization, or e.g. to clean up a suboptimal mass-import.
By default, the reflog expiration date is set to 90 days. An expire time can be specified by passing a command line argument --expire=time to git reflog expire or by setting a git configuration name of gc.
Setting gc.refLogExpire to "never" should do the trick.
I’m not sure where the format is documented, if at all, but git reflog
uses the approxidate
function from date.c
to parse the expiry time. One of the possible values is “never.”
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With