bfg-repo-cleaner

Can multiple files be specified when using BFG?

我只是一个虾纸丫 提交于 2019-12-05 01:43:36
I am trying to delete multiple types of files which cannot be covered by a wildcard. I tried using multiple --delete-files but it won't accept it. Also tried putting the files all after one --delete-files and it doesn't accept it either. Is there a way to put them all in one command? If not, then do I have to run git reflog expire --expire=now --all && git gc --prune=now --aggressive after deleting each type of file with bfg or can I just run bfg multiple times and then run that command after? LINUX G33NYUS It turns out that you can use a blob surrounded in quotes like "{a*,b*conf}" for

How to remove a protected commit using BFG

坚强是说给别人听的谎言 提交于 2019-12-04 03:42:41
When cleaning the repo with BFG ( https://rtyley.github.io/bfg-repo-cleaner/ ) ,encountered the following : Protected commits ----------------- These are your protected commits, and so their contents will NOT be altered: * commit ******* (protected by 'HEAD') Running BFG with: --no-blob-protection fixed it for me. The docs are here: https://rtyley.github.io/bfg-repo-cleaner/ , but I didn't see where they really call that out as a means to move past the error. Note: In my case I had already tried to remove files manually, not using BFG, which got me in a state where I had to use --no-blob

Bitbucket is alarming that my git repo is too large but I cannot confirm large files

柔情痞子 提交于 2019-12-04 00:58:13
问题 Bitbucket is alarming that my Git repository is over 1 GB. Actually, in Repository details page it says it is 1.7 GB . That's crazy. I must have included large data files in the version control. My local repository is in fact 10 GB , which means that at least I have been using .gitignore successfully to some extent to exclude big files from version control. Next, I followed the tutorial here https://confluence.atlassian.com/display/BITBUCKET/Reduce+repository+size and tried to delete unused

How to delete one folder / directory using BFG repo cleaner?

一世执手 提交于 2019-12-03 11:29:10
How do I delete only one directory using BFG? The help says: delete folders with the specified names (eg '.svn', '*-tmp' - matches on folder name, not path within repo) Which seems to mean that --delete-folders "config" will match all folders named config, anywhere in the repository. rm.rf.etc I found the answer here: remove files from specific path The author of BFG says it can't be done, unless you use a special command to dump all blobs for a given directory to a text file, and then use --strip-blobs-with-ids and provide that text file. [UPDATE] This doesn't work for me. I run the command:

BFG Repo Cleaner – Alternative to Fresh Clone

▼魔方 西西 提交于 2019-12-01 07:32:32
I was going to ask this on the repository but SO seemed like a more fitting place to ask this. I was able to use BFG Repo Cleaner (great tool, thank you!) to reduce our .git folder size by over 1GB, which is a smashing success as far as our repository is concerned. I have not pushed my bare clone to remote yet, as I am concerned with putting forward these changes before understanding the consequences of pushing and then not re-cloning. I understand that best practice dictates that when history has changed in this way, the best solution is to perform a fresh clone. However, I work with a team

Bitbucket is alarming that my git repo is too large but I cannot confirm large files

为君一笑 提交于 2019-12-01 03:47:41
Bitbucket is alarming that my Git repository is over 1 GB. Actually, in Repository details page it says it is 1.7 GB . That's crazy. I must have included large data files in the version control. My local repository is in fact 10 GB , which means that at least I have been using .gitignore successfully to some extent to exclude big files from version control. Next, I followed the tutorial here https://confluence.atlassian.com/display/BITBUCKET/Reduce+repository+size and tried to delete unused large data. The command files.git count-objects -v at the top level folder of my repo returned the

Git Merge Duplication after Ineffective BFG Use

别说谁变了你拦得住时间么 提交于 2019-11-30 07:26:22
I have somehow deeply borked by entire repository (used only by me) and could use some assistance in sorting it out. Here is what I did. I realized that in my commit history, there were some files containing credentials that I did not want just laying around. So, I decided to be legit and try to use the BFG Repo-Cleaner to fix these issues. I threw all the credentials in .gitignores, and moved on to trying to scrub them out of the history. As per the documentation instructions, I executed these commands: git clone --mirror myrepo.git java -jar bfg.jar --delete-files stuffthatshouldbedeleted

How to import git repositories with large files?

半城伤御伤魂 提交于 2019-11-28 14:28:44
Given that GitHub doesn't allow to push files larger than 100 MB , it is not possible to git clone and push a repository with large files into GitHub enterprise. The push fails with a: remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com. remote: error: File large.zip is 145.00 MB; this exceeds GitHub Enterprise's file size limit of 100.00 MB (N.B.: there is a repository importer , but this is only for github.com, and requires public access to your repository) Fortunately, GitHub provides support for storage of files larger than

How to remove big (>100MB) file from a GitHub repository and push successfully?

瘦欲@ 提交于 2019-11-28 11:51:35
I am in the same situation as described here after having inadvertently adding a big file that I don't want and having done additional commits of other work (not knowing the push would fail) after inadvertently adding the big file: Am I supposed to run BFG on the mirrored repo or the original? ATTEMPT #1 Tried this to remove the file: git rm bigfile git commit bigfile git push No luck. The push was still stuck on trying to upload the big file even though the later commit deleted it: $ git push Username for 'https://github.com': Password for 'https://traildreaming@github.com': Counting objects:

How to remove big (>100MB) file from a GitHub repository and push successfully?

主宰稳场 提交于 2019-11-27 03:42:13
问题 I am in the same situation as described here after having inadvertently adding a big file that I don't want and having done additional commits of other work (not knowing the push would fail) after inadvertently adding the big file: Am I supposed to run BFG on the mirrored repo or the original? ATTEMPT #1 Tried this to remove the file: git rm bigfile git commit bigfile git push No luck. The push was still stuck on trying to upload the big file even though the later commit deleted it: $ git