Add project to source control?

I am using plaformIO on VScode.
I have a workspace, and a bunch of folders with Arduino projects in them.
Some of the folders appear in the source control tab, others don’t.
How can I add the project folders w/o source control to be source controlled?

These are the projects:

These are the projects under source control.
image

Any hints appreciated.

Open up the Command Pallette…

… and type “Git init”, and hit enter when you see “Git: Initalize Repository”. You’ll then be asked what folder to initalise the git repo in… and it’ll be added to the source control list when the repo is initialised.

2 Likes

Thanks! :slight_smile:
I did this, and nothing happened??
(At least I did not see anything happening.)
What I did find thought was a .git folder was created in the folder I want source controlled.
Maybe this is all there is to it?!

It looks like I have to do this explicitly for each project folder.
Is there a setting to do this globally?

As soon as the folder is intalised (meaning git has created it’s database in .git), it should turn up in the source control providers list, and then you can do your first commit, and start tracking changes.

You’ll basically need to do it for each folder if you want commit histories for each project, the alternative being the projects folder itself being the repo, meaning changes to all the different projects get intermingled.

Since the command to initalise the folders is simply git init, it’s relatively easy to simply have that command run across each folder… You on windows? Can throw something together for that tomorrow.

1 Like

Thank you kindly… all good, just initialised the missing ones :slight_smile:
No need to do anything… I am grateful if I get answers to these simple questions I can’t seem to find in a docu, because they are so simple :blush:

1 Like

No problem at all… sometimes its the simple ones that are most elusive… like my current one… “Why does this the code to datalog to SD completely lose connection to the card after several hours… is it the card, code, or a mechanical issue?”

Never had success with SD cards on an Arduino… why I network them all. :slight_smile:

1 Like

I’m starting to think the exact same thing… MQTT to a central ‘server’ it may be. I’m strongly suspecting my issue is boiling down to a buggy SD card controller, or more likely a bad SD card socket module which isn’t doing proper ‘logic level’ voltage conversion… if so, quite disapointing really… just thought it would be handy to use the SD socket on the back of the TFT screen for datalogging… but it just doesn’t seem like it wants to happen… SD card just locks up after several hours (doing one write per hour). :-/

All my UNOs run Ethernet and talk via MQTT… highly-reliable.

1 Like

Ok, Ok, I get the hint… SD cards rubbish, networking/MQTT good! :stuck_out_tongue: :laughing: When the data moves from thinkspeak to self-hosted influxdb it’ll probably also go MQTT. I really like MQTT after using it in another project… and all of my home automation stuff will be moving over to that as a common control interface.