Kicad and firmware in one repository of github

Hi everybody,
I have about 30 circuits made until now. About 80-90% of this circuits has a microcontroller, so i have a firmware development of each.
Until now, I have a folder foreach circuit and inside a folder with name hardware and another folder with name software.
But now I’m looking to move to github. I’m novice in github.
My first idea is to make a repository of each “project”, something like Circuit1Hardware, Circuit1Software, Circuit2hardware…
The problem is I’m working with more people and this people has other repositories, so make about 60 new repositories is a crazy idea.
The second idea is to make a repository foreach circuit and then 2 branches, one for hardware and another for software. But by the way git works, everytime i change the branch, it removes all before. So I cannot have both hardware and software in my pc at the same time, and this makes so difficult to develop the software.
Antoher approach is use of submodules, but as far i know, this requires the same amount of repositories of my first idea.

How do you actually do to work with github? Which should be my best solution?


If you are a novice with git then having a separate repository for each project is the easiest. It’s also possible to have just one repository and put each project in a folder but when, not if, you have to do some git magic to resolve a conflict or a bad merge or something else it may be harder to navigate if you dont understand git well.

One monorepo is good for a team that works on the same projects so they usually need all (most of) the files of the repo.
Separate repos is good if you know most people will only need 1-2 project out of many and having them download/checkout them all is a waste.

First of all branches are not what you want. Branch has a specific meaning in git.

Creating a separate repository for each project is often the right start. Whether you keep hardware and firmware separate depends on how tightly they are bound. Are you saying you have 60 projects or you work on 60 projects?

For managing permissions for a group of people sharing your projects you may want to look into Organisations. Note that you don’t have to register collaborators on your projects. You could keep them at arms length and let them fork your repos then if they want to contribute they can submit pull requests.

to learn about GIT branches, a online training is here:

there are many books about git what is rather sophisiticated.
Understanding git is a prerequisite to understand gitlab but you may also use gitlab without any local git.

1 Like

Thanks for your answers.
There is some questions I want to answer.
One of the goals to this movement is keep a version control, and now i have a version of software and a version of hardware, because each development has differents speeds.
I have about 60 projects, but i’m human so now i’m only working on some of these. But, this move to github open the door to colaborate, so maybe another person can make the next version of X and not only me.
I don’t need manage permission because the github account is an enterprise account started years ago from our IT department. Now I’m trying to join his way to do the things. I’m managed.
I understand branches, but is only an idea because the ideal format is not granted by github.

Git has facilities for tagging releases. If hardware and firmware are separately released then they should be in separate repos.

Git is a distributed version control system. So you could have a master repo which is not owned by any particular person but by a software management account. Each participant checks out a full copy of the repo and works on it, submitting changes to the master repo. People can work on the project, submit their changes, leave, and maybe come back later.

The Git Book is free to download, you might want to try out operations on a personal repo on your own machine to gain experience. Or you can get a free account at Github or Gitlab, but of course don’t use it for work stuff, or you may leak stuff by accident.

1 Like

Git on itself works with the command line. There are GUI’s for git, those (I assume) work with the same command line programs in the background.

Because it’s all cli based, it should be quite easy to write a script to generate all your git repositories, make a first commit and upload it to your favorite git repository website.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.