Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize commit retention policy to maintain only the last 5 commits #14325

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DivyanshIITB
Copy link

This update enhances repository management by limiting the commit retention policy to store only the last 5 commits. By doing so, it prevents unnecessary commit history buildup, improves efficiency, and keeps the repository clean. This change ensures that recent commits remain accessible while reducing clutter in the commit log.

Fixes #14219 partially

@rmuir
Copy link
Member

rmuir commented Mar 3, 2025

To me, KeepOnlyLastCommit means only the last commit, not the last 5. I don't think this policy should be modified like this.

@DivyanshIITB
Copy link
Author

Thank you for your feedback! I understand your concern that KeepOnlyLastCommit might imply retaining only a single commit. My intention behind modifying this policy to retain the last 5 commits was to balance repository efficiency while ensuring some commit history is preserved for potential rollbacks.

However, if the policy is strictly meant to retain only the last commit, I can revise the implementation accordingly. Would you suggest renaming the policy if we were to allow retaining more than one commit, or should I strictly enforce keeping only the last commit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NRT replication should make it possible/easy to use bite-sized commits
2 participants