Is git's past history automatically deleted?

Asked 1 years ago, Updated 1 years ago, 45 views

If you commit a lot over the years with git, you will get a lot of commitments.
Does old data disappear automatically?(For example, Apple's time capsule.)

git

2022-09-30 21:12

1 Answers

I don't think there is a version management system that automatically loses historical commitments, not just git.

Git does not remove any existing tags or branch history commits over time.
Any existing tags or commits that cannot be reached from a branch are garbage-collected and removed when you use the git command after a certain period of time (for example, 45 days). As long as you use it normally, you won't have to be aware of this automatic deletion mechanism.
For more information, check out git gc and git reflog.


2022-09-30 21:12

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.