BFG Repo-Cleaner states my github repo is not a valid Git repository

I have fixed this using the following commands:

STEP 1

cd some-big-repo.git

STEP 2

java -jar path/bfg.jar --strip-blobs-bigger-than 100M 

No need to mention repo name explicitly if you are in the repo directory and it will automatically detect repo and do its job.


Point to a local copy, not a remote.

You have given your GitHub URL to the tool, but the usage section on their site says that you should work from a local copy of your repository:

Usage

First clone a fresh copy of your repo, using the --mirror flag:

$ git clone --mirror git://example.com/some-big-repo.git

This is a bare repo, which means your normal files won't be visible, but it is a full copy of the Git database of your repository, and at this point you should make a backup of it to ensure you don't lose anything.

Now you can run the BFG to clean your repository up:

$ java -jar bfg.jar --strip-blobs-bigger-than 100M some-big-repo.git

There is lots of other good content on that page; I recommend you read the entire thing before trying again.


You should remember that with git, all you do on your history must be done locally. And, after that, published by pushing to the remote repository, once you are satisfied.

So, here you have to give the path towards your local repository...