Thanks a lot for sharing this useful tool. Spent a few hours on finding the solutions, but not found anything, then I found this video and it worked. So nice. Saved almost 8GB after using this method.
Thanks, it was a really great support. The way step by step you have explained was indeed remarkable. I was fighting for this problem for the past 4 days and ultimately today got it done within a few minutes
This is no safe method. The history still remains on the server. Even if it does not show you, it can technically still be found. GitGuardian will tell you. He does not show you in this video...
You're a lifesaver, luckily I was using Firebase which according to their docs doesn't really care if you commit the api key info because they have more security rules which reject unauthorized http requests. However still not great because I haven't fully looked into the ins and outs of how they work. Anyways now I have a new key and my repositories history has been purged.
Great video. Will this works for merge request too? The issue we’re running into is that GitLab merge requests are read-only and therefore can’t be updated, so the push to the merge request refs is rejected, meaning secrets persist in the merge requests.
Doing this at scale is pretty scary. What would be a good recommendation for keeping config/environement files? Keep in mind, any one of a couple dozen people , located on the other side of the world to one another. Anyone may need to alter any one of them at any time. 3rd party, this or that?
When you talk about pushing to the remote repo 10:36 you say "all your history will still be there". Are you saying even when pushing with the force flag the remote repo will still have the old commit history?
No when using the force command you are forcing the remote history to match local history. I can see the confusion, what I meant was that if you delete the repository and create a new one you will still maintain history in the new repository (with the edits). Hopefully, this answers your question.
After java -jar bfg-1.13.1.jar --delete-files/--delete-folders "file.format' you need to write another command, bfg basically tells about this after command upper. Here it is: 'git reflog expire --expire=now --all && git gc --prune=now --aggressive'. This command basically checks all bfg logs files where it store the data of old commit-hash and new, and call git garbge collector to completle remove files from all commits exept the HEAD. For a local repo this 100% works right away, but for a remote repo it may take time, 1 day maybe. Although if you go to the past commits, then these objects will no longer be there, it will only be noticeable if you try to clone the repo back. And after this operations don't forget to push this changes to remove repo 'git push --force'
I tried 10,000 other solutions, followed guides, all of it...nothing worked until I found this. Thank you so much
I've been programming professionally for a good 5 years and I've never dealt with a more ridiculous and frustrating situation.
extremely idiot situation
Thank you, this has helped me !
You're welcome!
I've been stuck at this for a 1 day and a half and solved it thanks to your video. Thanks!
thnaks!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! git reset --soft HEAD^ saved my life
This video helps me alot, i have been stucked at this for two weeks. thank you
great video👍👍it's so helpful
Glad you think so!
Thanks a lot for sharing this useful tool. Spent a few hours on finding the solutions, but not found anything, then I found this video and it worked. So nice. Saved almost 8GB after using this method.
Thanks, it was a really great support. The way step by step you have explained was indeed remarkable. I was fighting for this problem for the past 4 days and ultimately today got it done within a few minutes
This is no safe method. The history still remains on the server. Even if it does not show you, it can technically still be found. GitGuardian will tell you. He does not show you in this video...
I am very grateful for your detailed informative explanations you explained everything very clearly.
Got a sensitive file for MongoDB. That was a relief. Thanks!
You're welcome!
You saved me my guardian. Thank you so much
You're a lifesaver, luckily I was using Firebase which according to their docs doesn't really care if you commit the api key info because they have more security rules which reject unauthorized http requests. However still not great because I haven't fully looked into the ins and outs of how they work. Anyways now I have a new key and my repositories history has been purged.
Lifesaver, thank You!
Exellent tutorial! 👌
Great video. Will this works for merge request too? The issue we’re running into is that GitLab merge requests are read-only and therefore can’t be updated, so the push to the merge request refs is rejected, meaning secrets persist in the merge requests.
thanks for such a lovely helpful video.
Glad it was helpful!
Handy and thank you. But you need a JDK which on my old mac was not easily possible. Crazy! Git should have something inbuilt to handle this better.
Perfect 🙏
what about multiple branches, do we need to do it for all the branches ?
Doing this at scale is pretty scary. What would be a good recommendation for keeping config/environement files? Keep in mind, any one of a couple dozen people , located on the other side of the world to one another. Anyone may need to alter any one of them at any time. 3rd party, this or that?
Sir, how to delete hidden files from the research gate?
Great video! You really put an effort to it. Also, helped me a lot! :)
Very useful, thanks!
How do i fix i used git clean -f and it removed filés in my directory as well
Thanks!
Amazing! thank you!
When you talk about pushing to the remote repo 10:36 you say "all your history will still be there". Are you saying even when pushing with the force flag the remote repo will still have the old commit history?
No when using the force command you are forcing the remote history to match local history. I can see the confusion, what I meant was that if you delete the repository and create a new one you will still maintain history in the new repository (with the edits). Hopefully, this answers your question.
@@GitGuardian i can still see the history in other branches, even i can see the files that i have deleted.
Thank you
00:06
oh geez, an intro? This is going to be long and painful
first line of java
The use of BFG is at 8:26
It didn't really work for me. Perhaps you could mention something about 'dirty' content
After java -jar bfg-1.13.1.jar --delete-files/--delete-folders "file.format' you need to write another command, bfg basically tells about this after command upper. Here it is: 'git reflog expire --expire=now --all && git gc --prune=now --aggressive'. This command basically checks all bfg logs files where it store the data of old commit-hash and new, and call git garbge collector to completle remove files from all commits exept the HEAD. For a local repo this 100% works right away, but for a remote repo it may take time, 1 day maybe. Although if you go to the past commits, then these objects will no longer be there, it will only be noticeable if you try to clone the repo back. And after this operations don't forget to push this changes to remove repo 'git push --force'