Hello all!
So, I've got a question- I want to be able to share/backup my entire project and all of its dependencies in a way that it can be shared easily with a computer that has zero project files, or be backed up and restored in case something happens to my local files/PC. My projects link to lots of libraries that are all stored in a central library folder.
I store things in a central library folder because project1 and project2 might both use LibraryA, for example. I have seen folks organize their projects differently though- making a Project1 folder, keeping the project code in there, and also keeping a libraries/dependencies folder inside of that for that project's dependencies. Sadly, this is not what I have been doing.
I know Github would be the best way to ultimately save, backup, track, and host my projects, but I've never used it and am just looking for some guidance on how to structure things and some resources on how to best get started.
My current folder structure looks like this:
Actual Arduino Sketches: My documents/Arduino Projects/[project name]/[project code .ino]
Libraries: My documents/Arduino Projects/Libraries
I use VScode with the Arduino plugin. I know VScode has some Git features too.
I know Git is the actual code repository system, and places like Github are hosting platforms for Git projects.
I'm hoping for some kind of "pack and go" experience. For example, I use Solidworks all the time. Different 3D models from all kinds of different folders end up producing one assembly of many models. I can use a feature called "pack and go" which saves everything to one new folder and links all the codependent files appropriately, so that I can send someone a single .zip of my project and it's got everything needed to open, inspect, and modify on a brand new PC.
This is what I hope to emulate. I have existing projects I need to "pack up", and I need a system I can employ for future projects that will lead to better and more organized project management for myself.
Does anyone have a good guide on getting started with better code management? Any experience using VScode's arduino plugin PLUS its Git features? I think I can manually move libraries into project folders, but how do I tell VScode where to look for those dependencies? How do I deal with having multiple local copies of LibraryA now that Project1 and Project2 both have a "lib" folder inside of them? Is there an industry standard approach to this?
As my projects are getting more complex and professional, and as I'm sharing with collaborators, the power and necessity of Git repos is becoming very clear. This extends beyond Arduino projects into other embedded systems, but I know this forum is one of the most helpful. Thanks so much for any suggestions.