开发者

How can I reduce the actual size of my github repo? (rather than just my local checkout)

开发者 https://www.devze.com 2023-03-24 14:35 出处:网络
I\'ve removed a few large files from my repo following these instructions: http://help.github.com/remove-sensitive-data

I've removed a few large files from my repo following these instructions:

http://help.github.com/remove-sensitive-data

However, if I do a fresh clone from my main repo, I still pull down the deleted data. I suspect it's because of this:

"Be warned that force-pushing does not erase commits on the remote repo, it simply introduces new one开发者_开发技巧s and moves the branch pointer to point to them. If you are worried about users accessing the bad commits directly via SHA1, you will have to delete the repo and recreate it."

I've tried pushing the commits to a new repo, and while it doesn't have the extra data, it's also missing all my github issues.

Two (related) questions: - is there a way to push the cleaned up repo to the main repo? - if not, is there a way to transfer the issues from the main repo to the new repo?


Alright, after some back and forth with GitHub's excellent support team (thanks Tekkub!), we figure out what was happening.

The answer was that the repo had tags, which kept pointers to the old data. The solution was to force-push the tags as well, ensuring that the old tags got deleted (and hence the old data got garbage collected).


If you still get the stuff you removed when you clone, then it is still referenced somewhere. Check out git branch -va on the fresh clone, you probably have an old branch pointing at the commits you wanted to remove.

0

精彩评论

暂无评论...
验证码 换一张
取 消