# Re: how to squash commits

2 messages from 2009-04-12 to 2009-04-12. Participants: Teemu Likonen, Matthieu Moy.
Thread: https://gitlist.dev/t/18837

## Teemu Likonen, 2009-04-12 15:39

Subject: Re: how to squash commits
Message-ID: <871vrxlw4h.fsf@iki.fi>
URL: https://gitlist.dev/e/871vrxlw4h.fsf%40iki.fi
In-Reply-To: <vpqocv1vr1y.fsf@bauges.imag.fr>

```
Let's add the Git mailing list to the Cc list if someone there wants to
comment. The whole thread is here:

http://thread.gmane.org/gmane.comp.version-control.mercurial.general/13283/focus=13295


On 2009-04-12 17:18 (+0200), Matthieu Moy wrote:

> Teemu Likonen <tlikonen@iki.fi> writes:
>
>> With the default settings user has 30 days to
>> recover the branch's previous state,
>
> Actually, s/30 days/90 days/ according to "man git-gc".

I understand it that objects which are not reachable form the tip of
current branches are subject for garbage-collecting in 30 days. For
example, let's say we are in "master" branch and do "git reset --hard
master~1". It makes the previous HEAD commit unreachable from "master"
branch and it can be GCd in 30 days (?).

My understanding can be wrong, of course. The manual explainst options
like gc.reflogExpire and gc.reflogExpireUnreachable separately but does
not draw the big picture how things work.

http://www.kernel.org/pub/software/scm/git/docs/git-gc.html

```

## Matthieu Moy, 2009-04-12 15:54

Subject: Re: how to squash commits
Message-ID: <vpq1vrxvpel.fsf@bauges.imag.fr>
URL: https://gitlist.dev/e/vpq1vrxvpel.fsf%40bauges.imag.fr
In-Reply-To: <871vrxlw4h.fsf@iki.fi>

```
Teemu Likonen <tlikonen@iki.fi> writes:

> Let's add the Git mailing list to the Cc list if someone there wants to
> comment. The whole thread is here:
>
> http://thread.gmane.org/gmane.comp.version-control.mercurial.general/13283/focus=13295
>
>
> On 2009-04-12 17:18 (+0200), Matthieu Moy wrote:
>
>> Teemu Likonen <tlikonen@iki.fi> writes:
>>
>>> With the default settings user has 30 days to
>>> recover the branch's previous state,
>>
>> Actually, s/30 days/90 days/ according to "man git-gc".
>
> I understand it that objects which are not reachable form the tip of
> current branches are subject for garbage-collecting in 30 days. For
> example, let's say we are in "master" branch and do "git reset --hard
> master~1". It makes the previous HEAD commit unreachable from "master"
> branch and it can be GCd in 30 days (?).
>
> My understanding can be wrong, of course. The manual explainst options
> like gc.reflogExpire and gc.reflogExpireUnreachable separately but does
> not draw the big picture how things work.

Oops, I think you're right. I didn't read about
gc.reflogExpireUnreachable carrefully enough.

-- 
Matthieu

```
