Technologists: one thing you must know if you use logseq with GitHub
Like many technologists, I use Personal Management Tools to manage information overload.
I've been using technology to help me keep track of complex technical material since the 1980s. These days, my favourite tool is logseq. You can use logseq to capture, connect and create technical information. Over the last couple of years I've built up a large, heavily linked knowledge graph - a second brain filled with information and ideas.
It's worked well for me but this week I hit a pitfall.
Using logseq with GitHub
If you use logseq as your PKM system you may be using GitHub to back up and version your knowledge graphs.
Logseq has great GitHub integration. Because of that, many users have adopted GitHub as a way of making sure their second brain is secure and easy to access from anywhere they want.
If you are using logseq with GitHub, beware - there's a potential pitfall lurking!
A trap to avoid
Logseq has great support for PDFs and mp4 videos.
You can embed your mp4 video files using drag and drop. You can also drag a PDF into the logseq window, open it and highlight items of interest in the PDF. You can even copy your highlights into your notes.
But when logseq tries to commit your changes, GitHub may object!
Watch out for large files
If you use logseq to capture large files you're likely to encounter GitHub's file size limits.
Git will allow you to commit large files locally but GitHub won't allow you to push them to the central repository. GitHub warns you if you try to push files larger than 50MB, and it will refuse to push files larger than 100 MB.
If you try, you'll see an error message refusing your push.
error: GH001: Large files detected
Fortunately there's an easy solution: GitHub LFS.
LFS to the rescue
GitHub LFS (Large File Storage) allows you to version and push files which are larger than GitHub's normal 100MB limit.
It's easy to add LFS to an existing repository if there are no large files. You'll find detailed instructions here.
What if you've added large files to your graph and GitHub has refused to let you push it?
There's good news about that too.
There's a tutorial on GitHub which tells you how to migrate large files that have been committed locally and need to be moved to LFS. After I'd enabled LFS, all I had to do to migrate my existing mp4 files and PDFs was to run
git lfs migrate import --include="*.mp4"
git lfs migrate import --include="*.pdf"
and I could then commit and push in the usual way.
LFS won't break your budget. Every account gets a free 1 GB storage allowance, and you can pay just $5/month to add a 50gb datapack. There's also a bandwidth limit, but you're less likely to be constrained by that.
GitHub and logseq make a great partnership, but if you're going to store videos or large PDFs you'll want to add LFS support to your GitHub repository.