Hi,
It's cool. But for a new user, why not just state on the landing page of the repo how to install this application on their machine ? It's not obvious that it's a jar file meant to be run.
@srugano I agree, I had no idea how to properly install it. Luckily I found it on homebrew so I installed it with brew install bfg
@srugano You might have not seen this BUILD.md file which contains the installation instructions:
https://github.com/rtyley/bfg-repo-cleaner/blob/master/BUILD.md
I almost missed it, I was expecting the instructions to be in the README.md. I would have liked to see that to the README earlier.
Can we still get this added?
So...? There are no UBUNTU apt install for bfg?
... Please see the "new user" second and BIG PROBLEM: there are no link to download jar file, we need a link as rememberded by https://github.com/rtyley/bfg-repo-cleaner/issues/304
I am sorry but I have absolutely no idea what the instructions on the readme file really mean. :(
I never use java. All I want to do is delete some binary files from my repository.
Hi @ajtruckle , the instructions are confuse because there are no visible download link... If you dowload bfg.jar you can run it by the intructions of https://rtyley.github.io/bfg-repo-cleaner/
Check the latest bfg.jar download at http://repo1.maven.org/maven2/com/madgag/bfg/
for example bfg-1.13.0.jar.
The step-by-step is:
check your computer's Java: at terminal run a command, e.g. help command java -h... Perhaps to check version will be java -version.
Download the last bfg.jar
open terminal, go to the same directory of the jar file (cd path) and run the bfg command... Example bfg help command is java -jar bfg-1.13.0.jar --help.
If it is running fine, you can follow instructions of http://repo1.maven.org/maven2/com/madgag/bfg/
@ppKrauss When I put the JAR file in my repository folder and bring up a Git Bash Console and try your java command it says that java is an unknown keyword.
Hi @ajtruckle seems that you must install Java, that is native for systems like Ubuntu but perhaps not for Windows, check with google the easyest way to install Java in your computer. The reliable source for download is https://www.java.com/download/ ... see https://java.com/en/download/help/windows_manual_download.xml
@ppKrauss I have installed java.
I can now run the java line you gave me and it shows the help.
I have the bfg-1.13.0.jar file in my repository folder.
if I type bfg --delete-files *.apt it says bfg is not found.
ok i have to prefix with java keyword.
Hi @ajtruckle, good. Next step is to folow (and understand) the instructions at https://rtyley.github.io/bfg-repo-cleaner/ ... Well, the main pieaces to understand are:
cd yourPath; git clone --mirror git://example.com/some-big-repo.git
will create a new sub-directory on yourPath directory... Pleae use the repo name like https://github.com/FAQGURU/FAQGURU.git that is the "clone or download"
string at https://github.com/FAQGURU/FAQGURU
run a bfg command. You need to replace bfg by java -jar bfg-1.13.0.jar.
Example: try to delete all files with more tham 1M with the command java -jar bfg-1.13.0.jar --strip-blobs-bigger-than 1M my-repo.git
where my-repo.git is the name of the new sub-directory created in the item above.
If you're on Windows and you use scoop, you can scoop install bfg from powershell
For an automated Linux install: bfg install via Homebrew-on-Linux seems to work nicely.
This is my install script working on Ubuntu 20.04:
#!/bin/bash
set -e
# install java
sudo apt -y install default-jre-headless
# fetch latest bfg.jar
sudo wget https://repo1.maven.org/maven2/com/madgag/bfg/1.13.0/bfg-1.13.0.jar -O /usr/local/bin/bfg-latest.jar
# install to /usr/local/bin
echo -e "#!/bin/bash\njava -jar /usr/local/bin/bfg-latest.jar \$@" | sudo tee /usr/local/bin/bfg
# mark executable
sudo chmod +x /usr/local/bin/bfg
This is coded to install version bfg-1.13.0.jar but perhaps could be improved if anyone knows a link to the latest binary release (e.g. release-master.jar or similar).
I agree with the first original comment. As a git beginner, it took me more than a day to realize that there was a Download button in a small font at the top of the page. I thought I just had to type in the code. I also didn't really know WHERE i was supposed to type this code in. In the local copy of my repository? In the cloned copy I just made? I'm finding the resources available for beginners to do this very lacking and am getting super frustrated.
It is really not clear from the documentation; but there is a download button here: (https://rtyley.github.io/bfg-repo-cleaner/)
Once you havebfg-1.13.0.jarin your directory you can run $ java -jar bfg.jar --strip-blobs-bigger-than 100M some-big-repo.git
@srugano I agree, I had no idea how to properly install it. Luckily I found it on homebrew so I installed it with
brew install bfg
Bless your soul.
Can you guys distribute a executable (like a binary) which doesn't require to install java ?
Most helpful comment
@srugano I agree, I had no idea how to properly install it. Luckily I found it on homebrew so I installed it with
brew install bfg