bfg-repo-cleaner

Git Merge Duplication after Ineffective BFG Use

北战南征 提交于 2019-12-18 12:33:19
问题 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

Replaced text with BFG, and now it shows my fork is several hundred commits ahead/behind

跟風遠走 提交于 2019-12-13 19:45:55
问题 I recently forked a project and after a few dozen commits, noticed there was some sensitive info I wanted to remove from a file. While wanting to remove that, either by undoing only my commits for that file, and redoing changes as one, or possibly replacing a text string, I found BFG. What I ran was: bfg --replace-text replacements.txt -fi file . and then 'git reflog expire…' as suggested by the BFG output. After force pushing to remote, my fork nows says: This branch is XXX commits ahead,

Inspect git repo after using BFG repo-cleaner

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 09:35:49
问题 Very basic git question: I uploaded some compromising information to Github and am using bfg to clean the repo. I followed the documentation and performed the following actions: $ git clone --mirror git://example.com/some-big-repo.git $ bfg --replace-text passwords.txt my-repo.git I received the following output: Found 233 objects to protect Found 9 commit-pointing refs : HEAD, refs/heads/experimental, refs/heads/master, ... Protected commits ----------------- These are your protected commits

How to remove a protected commit using BFG

你。 提交于 2019-12-09 17:14:22
问题 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') 回答1: 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

How to update/shrink the size of my github repo after running BFG Repo Cleaner

假装没事ソ 提交于 2019-12-09 14:50:10
问题 I have cleaned my repo with BFG Repo Cleaner using the following procedure: $ git clone --mirror git://example.com/some-big-repo.git $ java -jar bfg.jar --strip-biggest-blobs 500 some-big-repo.git $ cd some-big-repo.git $ git reflog expire --expire=now --all $ git gc --prune=now --aggressive $ git push I can see that my local repo has shrunk with 1GB. Great. The problem that I'm having now and that I haven't been able to find any info on is that now I would like to also shrink the size of the

Removing files from past commits in GitHub repository with BFG Repo-Cleaner

你离开我真会死。 提交于 2019-12-08 09:02:29
I have a file in my GitHub repository that I would like to remove from my previous commits. I used BFG Repo-Cleaner's delete-files command and it appeared to work, but when I go on my GitHub repository the file is still on all the previous commits. If I try and do the command again, it gives me a BFG aborting: No refs to update - no dirty commits found?? Am I misunderstanding how BFG works? If so how can I remove the file from my past commits on GitHub? Here are the steps I took: Cloned a copy of my GitHub repo into a local folder using the --mirror flag. I then cd to my local visual studio

Removing files from past commits in GitHub repository with BFG Repo-Cleaner

我只是一个虾纸丫 提交于 2019-12-08 08:15:26
问题 I have a file in my GitHub repository that I would like to remove from my previous commits. I used BFG Repo-Cleaner's delete-files command and it appeared to work, but when I go on my GitHub repository the file is still on all the previous commits. If I try and do the command again, it gives me a BFG aborting: No refs to update - no dirty commits found?? Am I misunderstanding how BFG works? If so how can I remove the file from my past commits on GitHub? Here are the steps I took: Cloned a

Am I supposed to run BFG on the mirrored repo or the original?

假如想象 提交于 2019-12-07 04:26:26
问题 I want to delete two files from my git repo that aren't there anymore. I put them in, committed, and tried to push but they were too large. So I took them out, and kept working, then committed, tried to push, but it still gave me the same error. I figured they're still in the history somewhere. I think I made the problem worse because I kept working in that branch and made 1 more commit. Then I merged that branch back to the master branch. So I searched for a solution and found bfg. But the

Can multiple files be specified when using BFG?

你离开我真会死。 提交于 2019-12-06 20:16:02
问题 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

Inspect git repo after using BFG repo-cleaner

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 18:14:40
Very basic git question: I uploaded some compromising information to Github and am using bfg to clean the repo. I followed the documentation and performed the following actions: $ git clone --mirror git://example.com/some-big-repo.git $ bfg --replace-text passwords.txt my-repo.git I received the following output: Found 233 objects to protect Found 9 commit-pointing refs : HEAD, refs/heads/experimental, refs/heads/master, ... Protected commits ----------------- These are your protected commits, and so their contents will NOT be altered: * commit 497fc1c8 (protected by 'HEAD') Cleaning --------