FreeCAD Project Diff and Git

I’m curious how others are managing their FreeCAD files. Ultimately, I would like to keep them in Git so I can store and keep versions.

I’ve seen that FreeCAD files are more diffable (?) if you store them with zero compression. A FreeCAD file is a zip file.

It would also be helpful if you could diff versions. I see this project which basically takes snapshots along the way and somehow is Git-aware.

I am using Time Machine on my Mac to my NAS if I need to walk back inbetween increments.

Otherwise, each project gets it’s own folder in my master CAD docs folder, and go by the “Save As” route and use the 0.0.1, 0.0.2, for major.minor.incremental. Then if I am smart about it I will add a “- Comments” on what the revision was, but laziness doesn’t always adhere to that part.

I really need to sit down and learn GitHub, but the way it’s set up still confuses the heck out of me. I am not a native coder so that may be this issue.

Yea, I’m doing the Save As route right now, but I don’t like it. Git at least forces me to enter a comment (commit message).

Feel free to ask questions about Git/Github. Git is pretty easy to get started but mastering it is hard, although you probably never need to.

I agree the file versioning is clunky at best. At least this is one step better than what I deal with at work…

And thanks, will do on git. If you moved to git would you store it in a local repository or use GitHub? Do they have file size limits - with versioning the repository would balloon pretty quickly?

I would put it on Github and that’s the nice thing about Git, you would have a local copy of the repository and sync it to Github.

Sounds like Github blocks files larger than 100 MB (although you can store 2 GB files using Git LFS). I don’t see a hard limit but it recommends less than 1 GB.

Really interesting, that would be more than enough for anything I would ever design.

Just read through the DiffCad, and now I think I am going to have to consider really sitting down and learning this and Git before I start my next large project.

I just have a Nextcloud so I don’t have to give it to corporate overlords. :face_savoring_food:

I thought of using git as well but definitely not suing github as is owned by microsoft. I ended up creating a million files with different time stamps for the same project and I host them on Proton Drive.

Yeah, that’s what I meant with the corporate overlords. :stuck_out_tongue:

They are just one of the few unfortunately the list of corporate overlords in too long for my taste :slight_smile:

Meh. I use tons of Microsoft products and services both personally and professionally.

There are other hosted git services like GitLab, Bitbucket, Codeberg, etc. For the purposes of this conversation, it doesn’t matter whether using a service like this or running git locally.

This looks promising for local use:


Something like this?

You seem to get the difference. But it is important to point out that Git is completely independent from github. You can use git on one machine to do version control. You can use git to a local server to copy the versions and share with coworkers. Github is just a pleasant interface to the server portion. Other alternatives exist (like bitbucket or gitlab). Or just about any linux machine can be a backup or server for git on its own.

That said, I use github mostly because it is feature full and most commonly used.

Looks like this is still the same one I originally shared but it was renamed. Thanks for bringing this back up, I should really do something about this.

The main thing I don’t like, as someone familiar with git, is that they don’t use git terms. But I can deal with that.

I migrated all of my github stuff over to a local gitlab setup over a year ago. It’s worked quite well. I even have a local kube system setup so that gitlab can spin up CICD runners as needed automagically. Fun stuff.

I store some of my freecad files in git, but I just store the .fcad file. I need to look into something better.

I came across FreePDM a while back. Not sure if this would be any better.

Anything that is in binary is famously awful in git. Maybe that’s too harsh. Git is really good ad doing diffs beween text files and only does the minimum for binary diffs. It’s probably not a big deal if you’re the only one using it, especially on only one computer. But if the entire file gets copied with every minor edit, your .git folder will get huge. There are some plugin/3rd party things that can help. Git-lfs was what we used at my work. Basically you would only download some of the binary history if you cloned the entire repo. Other copies would only get checked out when you grabbed those different versions. It still sucked, but better than standard git.

And anything is better than no backups and no revision history. The thing I like most about git is that every checked out copy is pretty much a backup. We used to share commits, versions, and history peer to peer with git when we were in the field. That was magic, coming from CVS.

I’d say it isn’t harsh enough…

I’ve not used the free version of Gitlab, but I have rolled out some Gitea instances before.

It’s very similar to Github, and is fully open source.

It is used by some big projects like Blender: https://projects.blender.org/blender/blender