Trouble cloning the FluidNC repo?

So my internet here is frequently :poop:

And I wanted a copy of Bar’s fork of FluidNC to have a poke at

But using GitHub Desktop failed, as did the GitHub CLI, HTTPS pull and SSH. The cause was a few too many rather large BLOBs (Binary Large OBject AKA Big Lump O’ Bytes) that would fail in some way or other mid-download and cause the ‘cloning’ of the repository to fail.

Eventually I found this in Stack Overflow Is there any way to continue Git clone from the point where it failed? - Stack Overflow

So I tweaked my command to be:

git clone --filter=blob:none --bare https://github.com/BarbourSmith/FluidNC.git

And followed that up with:

cd FluidNC.git
git rev-list --objects --all

The last command (rev-list) will go and get all of the BLOBs that the first command deliberately left out. Most of these will actually be kinda tiny files, but the multi-megabyte files causing problems will be included. And best of all, it is recoverable after a failure.

And once everything is done - which will take ages - you can change back to the parent directory and clone from your now local bare directory into your working directory.

cd ..
git clone FluidNC.git
1 Like

Let me know if you have questions on the code or trouble getting it to build with PlatformIO. I’m planning to do a video all about which files in the code do what, but it’s not that high on my list since there are so many “how to use the machine” videos needed at the moment.

And it did this for me again, when I tried to get the fork that I had just done.

1 Like

… and then there’s one last step which is fixing the remote origin for git, because currently it’s just pointing at your local drive.

git remote -v

Should return something like

origin  C:/GitHub/FluidNC.git (fetch)
origin  C:/GitHub/FluidNC.git (push)

YMMV but you should be able to tell that it is still pointing somewhere local to your machine.

So now you need to point it at the actual remote repo. PS if you got here by doing a fork (in GitHub), then that might read something like:

git remote set-url origin https://github.com/md8n/FluidNC.git

Running git remote -v again (and assuming that you did a fork) should get you something like

origin  https://github.com/md8n/FluidNC.git (fetch)
origin  https://github.com/md8n/FluidNC.git (push)
upstream        https://github.com/BarbourSmith/FluidNC.git (fetch)
upstream        https://github.com/BarbourSmith/FluidNC.git (push)

Job done.

1 Like