Ответ 1
Конец, который недоступен через любую ссылку, в конечном итоге будет удален, включая reflog. По умолчанию этот период времени довольно консервативен. Существует несколько параметров, которые можно использовать для настройки с помощью git config Ниже приведены некоторые из конкретных опций.
Множество людей (включая меня) предложили бы, чтобы вы настраивали свои крючки приема, чтобы отрицать несбыточные переходы, что в значительной степени заставило бы эту проблему обсуждать (на сервере люди все равно могли потерять нечистую локальную работу).
gc.auto
When there are approximately more than this many loose objects in the repository, git gc --auto will pack them. Some Porcelain commands use this command to perform a light-weight garbage collection from time to time. The default value is 6700. Setting this to 0 disables it.
gc.pruneexpire
When git gc is run, it will call prune --expire 2.weeks.ago. Override the grace period with this config variable. The value "now" may be used to disable this grace period and always prune unreachable objects immediately.
gc.reflogexpire
gc.<pattern>.reflogexpire
git reflog expire removes reflog entries older than this time; defaults to 90 days. With "<pattern>" (e.g. "refs/stash") in the middle the setting applies only to the refs that match the <pattern>.
gc.reflogexpireunreachable
gc.<ref>.reflogexpireunreachable
git reflog expire removes reflog entries older than this time and are not reachable from the current tip; defaults to 30 days. With "<pattern>" (e.g. "refs/stash") in the middle, the setting applies only to the refs that match the <pattern>.