Version Control

I use only the desktop IDE, which is not the case you are posing here, but here I go.

I have more Arduino libraries installed than I care to count, but to maintain version control on a specific project, I keep a lean second Arduino folder, containing only the relevant code of both my work and the libraries used, including libraries I wrote.

What I can suggest you to do is save a copy of the Arduino folder that contains your sketch and the libraries it uses and name your folder after the version number.

Be sure to keep the full stack so new library versions do not change your executable and then you run into a surprises later on. Be aware that this may have to include the IDE version, so keeping a copy of the zip file may be also necessary to maintain full version control.

It will all depend on how thorough you want to be with your version control. And yes, this is mostly manual.