Houdini - git versioning .hip and HDAs

General / 05 November 2020

This week I tried something different. I used git version control to keep track of changes to my .hip files.

Imagine being able to go back to some obscure version of your .hip file from way back before you made that terrible change. With git, you can! It's better than saving multiple versions of your file because it allows you to see a graphical history (as long as you have a GUI installed) of your changes. Not only that, but every change gets committed with a (hopefully) meaningul description that you write so you don't forget what you did.

What is git?

If you don't know what git is, it's a tool mainly used in software and game development to keep track of changes in the project. It can handle edits from multiple users and provides functionality for rolling back to previous versions if you make a mistake. It doesn't duplicate the project every time you "commit" a change, it only stores info about what changed making it fairly lightweight. 

This only works for files that aren't stored in a binary format. This means that by default, .hip files aren't compatible. Good thing you can save them in text format!

How do I use it?

The way that I have things set up now means I'm using git alone. And it's still useful! Just today it came in real handy when iterating on a scene with my supervisor. We got up to version 6 of a render when he said "hey, version 4 is better". I agreed, our changes ruined it! Luckily it was easy enough to go back in time just like nothing happened. From there, we created a new branch so as to not lose the history of our other work and everything worked perfectly!

Source: https://www.atlassian.com/git/tutorials/using-branches

The image above is a good visualisation of what I'm talking about. You could even also make a new branch just to try something without risking damage to your work. A very common thing to do in the development world actually.

Give it a go! You might like it! Just try it out on test files though, it is possible to incinerate you work if you're careless.