The v1 code needs comments and tracer routines adding (for me to work out what’s going on); and reformatting to be more intelligible (to me!); and I need to create a load of testing. So I want the v1 code to be under revision control.
The v2 code doesn’t exist yet, but as it gradually comes into being I’ll also want this under revision control but in a separate repo. Maybe I could do something clever and have the v1 and v2 versions in separate branches of a single repo, but that’s not me – I’m just not clever enough!!
I also want other folders with supporting materials, which probably don’t need to be under revision control.
In the graphic below, I’ve tried to outline in very simple terms what such a project might look like (note that I’m specifically talking about local repositories here, ie., repos on local disk and not on, say, GitHub):
So how to achieve this, and specifically how to achieve this in vscode? Fortunately it’s pretty easy:
- Use vscode | File | Open Folder… to open the folder ahk v1 scripts here. Then go to vscode’s Source Contol panel (as shown in image below) and initialise a repo.
- Repeat this for the folder ahk v2 scripts here.
(At this stage we should have the required folder and repo structure per the 1st graphic above.) - Then, to start working on the project, simply use vscode | File | Open Folder… to open the 'parent' folder Git Repos across 2+ folders.
The image below shows what happens after I put some minor changes in both the AutoHotkey files (1 in each of the 2 separately source-controlled folders). Then the Source Control panel shows them as having been modified (note the blue counter showing "2" as source control has detected two files that have been changed) and ready to accept commit messages (1 to each of the separate repos) before subsequently committing:
The image above also shows what happens if you access the Show Commit Graph (indicated by the red circles), and specifically shows here the commit graph for the repo in the folder ahk v1 scripts here. Clicking on the other Show Commit Graph button replaces the commit graph with the one for the folder ahk v2 scripts here.
Obviously, as a vscode newbie, if I've got things wrong in the above or there is a better way to do it, then I'd be delighted to hear about it .