@Coen said:
Install GitPython in blender
Is there any reason this can't be bundled with the IFC git add-on? :-)
Yes, GitPython is all python, so it can be stuffed into a zip installer and it should work anywhere. Though it uses the git
executable for some operations and I don't see an easy way of bundling this, Git itself will still be a separate install.
I might be using the tooling wrong, but I can't manage to create a new branch

Basically a Git branch or tag name has restrictions, in particular it can't have any spaces, the operator won't be enabled unless you enter a valid name in the text box. I don't like this UX, but I don't know what the best way of doing this is, I could enable the button and put a message in the status bar when you try and use an invalid name, or even a pop-up error, maybe.
I made a branching in git fork it shows up in BlenderBIM, however I don't see any changes I am making
The add-on shows the Working branch, you should see all commits if you select the same branch in Browse branch
Futhermore questions
- Is the browse branch a git checkout?
No the browser is for navigating around the history, but nothing happens to the current project unless you click on the switch revision or merge branch buttons.
- Where could I run git commands? Just in the Blender terminal?
You can run git commands (creating branches, tagging etc..) in the system console (cmd.exe
) or in a Git GUI, the add-on should pick them up when you click the refresh button.
- How would I collaborate with someone using pull requests? This is the Ifc Merge tool I guess?
The add-on doesn't do any remote commands (yet), but this shouldn't stop you from doing this stuff. Basically you are managing a local repository in the add-on, but this repository can have a remote origin
that points to an online repository (or it can have multiple remotes if you really want to make your head hurt).
- How would I set up a remote server connection? It's just storing the ifc file on a remote git server somewhere I think? Just as easy as that? :-)
So assuming that you have a local IFC file with some history in a local repository, you can create an empty remote repository on github - which then gives you instructions for adding this as your origin
, and then pushing your main
(sometimes called master
) branch to it - after this anyone can clone
the repository from github, they can open your IFC on their own computer, make their own changes, browse the history etc..
The procedure for merging somebody else's remote repository is basically: create a local branch for them and pull
their remote work into this local branch (for now these steps need to be done outside the add-on, github gives instructions for doing this whenever you have a pull request waiting). At this point you can browse their commits in the add-on just like any other branch, and even switch revision to view their model (which won't break any work you have committed to your own branches). But to merge their work, you need to be switched to the HEAD of the branch you want to 'merge-into', then find the branch you want to 'merge-from' in the browser and click the merge branch button.
If anyone is up for experimenting with this nice tool on Github please let me know :-)
This might be a useful resource for people who never have done anything with git and like to use this tool:
https://github.com/skills/introduction-to-github
I coming around to thinking that Git is a core technology of the 21st century (like the internal combustion engine in the 20th), but it is unintuitive and the documentation only makes sense when you have a solid overview. I think this add-on should centre the functionality for users to store, browse and retrieve revisions, as this is conceptually straightforward and immediately valuable. Branches, pushing, remotes, merging, pull-requests etc.. are powerful but they can easily overwhelm the GUI and cause much confusion, so they need to be introduced carefully.