How to organise git repository

Hi all,

I have seen git being used in the context of a single project.
But my processing sketches are a collection of lots of small projects.

With that in mind, could anyone help me with suggestions on how to structure my git repo?
If you could share how you do yours, this would be great.

My initial idea was to have a branch per sketch.

I know this is not a git forum and there’s plenty of git explanations out there.
But I couldn’t find something that would fit in this context.

Thank you in advance.
E

Hi,

Most of the time, a git repository is responsible for storing one single project. If your project depends on another projects, you can use git submodules.

From what you described, it looks like you are developing multiple separated projects but I wouldn’t recommend pushing them to the same repository except if they are composed of more than one file, which in this case it will be better to split the projects.

Are your projects contained in single .pde files or you are using an IDE like Eclipse to develop?

You can also check those threads :

Something like this?

You can also use Gist for small projects:
Gist.GitHub.com/GoToLoop

1 Like

My projects are mostly a single .pde files.
Each file has its own folder because processing forces me to do so.

In the stackoverflow link you’ve shared has someone going over a possible solution for a similar problem. I will test it, it seems like it will work.

Thank you for sharing that.

1 Like

Yes, it is something like the coding train link you’ve shared.
It seems like he uses only one branch though.

I am not familiar with Gist but I will read about it.

Thank you.