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

How to remove stale files #61

Open
malaybasu opened this issue Aug 20, 2015 · 5 comments
Open

How to remove stale files #61

malaybasu opened this issue Aug 20, 2015 · 5 comments

Comments

@malaybasu
Copy link

Is there anyway to remove stale files from git-fat?

@abraithwaite
Copy link

It's not a command in git-fat, but heres a start: git fat status | sed '1,/Stale objects/d' | tr -d '\t'

That'll list all the stale objects.

@malaybasu
Copy link
Author

Thank you for the reply and pardon my ignorance. Can I just delete those objects from .git/fat/objects? Is there anything like original "git fat gc" command?

@abraithwaite
Copy link

You don't need a pardon, it's a good question!

You can delete them from .git/fat/objects if you're certain they've been pushed to the central repository. Otherwise they'll be lost forever.

The git fat gc command was never reimplemented as a safety net to prevent people like myself from shooting themselves in the foot, but might still be useful with a fat warning message.

@malaybasu
Copy link
Author

Thank you. Git history will still have a reference to original file, right? So if I revert back to a previous commit, the git fat file with the sha1 referece will come back, but the binary blob file will be missing. Will it create problem with git fat?

@abraithwaite
Copy link

You are correct entirely. If you check out that commit again and the blob is missing locally, you can do another git fat pull and assuming it's on the server it will download it and restore it again. :-)

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

No branches or pull requests

2 participants