Git and Xojo project format

I’ve converted my project from the Xojo Binary format to the Xojo text format.

I’ve done this for two reasons:

  1. version control with git
  2. significantly easier to work with LLM tools

I’m the only person working on the project (well Claude 3.7 Sonnet as well) and don’t need to worry about branches. It’s pretty straightforward - code changes, commit and push to GitHub.

Are there any Xojo specific best practices for working with git? Are there any practices to avoid?

Branching is not just for teams. It is useful when you have a more significant refactoring that you will need to continue while still maintaining bug fixes for a given release. Once you have a stable replacement the branch can be merged.

Remember to check in when you’ve achieved anything significant. If you forget then you loose the benefits of GIT. Make comments in your check-ins so you know what you’ve done when. Trying to figure them out via diffs later is never as clear as when you’ve just finished something.

5 Likes

Not really specific to Xojo but commit early, often, and regularly. Nothing worse than spending many hours on code to throw it all away because you’ve made some disastrous mistake you only found out about later. With intermediate commits it’s easy enough to back out to a commit.

I tend to do it in sections. If I’m working on a class I get it working in a minimal state. Commit. Get the next thing hooked up to my satisfaction. Commit. There is no downside to committing more often than not.

8 Likes

Do you merge work in progress commits before pushing, or leave all the commits stand alone?