threads / discuss / 39017

About git log

Subject: About git log

## tl;dr

2 messages between Apr 6, 2015 and Apr 24, 2015.

replies: 1people: 2as markdown or json

Kevin Daudt· Apr 24, 2015, 10:57 UTC · re: niu2x · lore

Re: About git log

On Mon, Apr 06, 2015 at 10:21:37PM +0800, niu2x wrote:
> I'm a beginner.
> Please tell me the log of git commit is exist forever or 90 days

As long as a commit is (indirectly) referenced by a branch or tag, it will be kept forever. Only if you rewrite history causing commits to be unreferenced (for example, by using git reset --hard), the commits will be eventually removed.

The 90 days you might have heard of, refers to the time the reflog keeps reference to commits so that you can find them back in case you accidentally caused the commit to be unreferenced.

Entries in the reflog will expire after 90 days, after which no reference to the commits remain, and the garbage collector will remove those commits.

← back to recent threads