You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I am using the repository as the source for netlify. Everything in the repository is generated by a script so I do not need any history.
So I have two questions:
- how can I remove everything except the current version of every file?
- Is it possible to prevent git from storing versions.
I have tried just deleting and reinitialising the local repository and doing git push --force but it made no difference to the remote.
Hi, @Nina Lanyon, welcome to the community!
I found a repository under your workspace that was over 3 GB, so I ran the GC against this repo and managed to reduce its size. Just to give you some context around the reason your repo size didn’t change after you deleted some files and pushed it, the remote repo still had the old references as well, so the GC is required on the remote repository to clean up any old references you have removed.
Answering your question about how to remove everything except the current version of every file, I recommend that you use BFG Repo-Cleaner to achieve that. The following documentation has a very good explanation on how to proceed with that:
I also would like to share with you that we have a feature request to allow users to mark repositories for git GC, as you can check here:
Please consider adding yourself as a watcher to receive the updates as we make progress with this. If you are not familiar with our Feature Request Policy, you can read more about it here.
Feel free to share any additional questions or concerns regarding this case.
Kind regards,
Caroline
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.