Short form: What do the cool kids do when developing an Arduino library under git control?
Assume I'm creating an Arduino library, and I'd like to maintain it under git along the way, ending up with something clean and elegant like this one. What's the preferred work flow?
As it is now, I edit my library files in Documents\Arduino\libraries<my library>\ and then copy them to my git repository after I've made changes -- that's somewhat awkward. I'm sure there's a better way, and to repeat myself: what do the cool kids do for this?
It depends on Your environment. My know-how for the problem You described is restricted to my environment, which is Eclipse/Sloeber and Linux.
And I have several libraries which are not specific to Arduino (state machine, ring buffer, math procedures, tools for this and that) and which I use also for other projects (e.g. C++ graphical applications with GTK+/gtkmm).
My solution is a GIT repository organized to my personal needs. The files from this repository are then linked (Linux links, do not compare with Windows links) into my Eclipse projects (Arduino and others).
So for all of my libraries I have only one source environment (that GIT repository) but many different projects. If I find an error or have an improvement in one project, all other projects will use the new version automatically.
P.S.: It is not the link provided by the IDE, which has other path dependencies. It is the fundamental file link of Linux, which has the same behavior as a real copy of the file. You can do such things also with Windows, but not from the graphical explorer environment. You must use the terminal (cmd.exe) and make the link via command line. It does not work with FAT (USB-Sticks) but with NTFS.
@profrob You are clearly one of the cool kids, but as you might have guessed from the backslashed pathname in the original note (Documents\Arduino\libraries\<my library>\ ) I'm on a Windows system. So linking isn't an options.
But my follow-on question applies: if there's an examples/ subdirectory, does Arduino know how to follow that? And ditto for a src/ subdirectory: does Arduino know to look for the .cpp and .h files there?