This describes what I observed, for future reference.
Date: 2024-03-05
Windows 10 Pro Education, standalone installation (not university managed)
VSCode web page, click download, select Windows "User installer" x86
Run the installer
The only really important configuration option seemed to be "add vscode to PATH"
start vscode
Aside: I clicked "remote connection" and "SSH" and it automatically installed the remote-ssh extension. So vscode does sometimes automatically install extensions.
From the menu bar, I did Terminal → New Terminal. It started a PowerShell terminal. e.g. pwd, cd /, cd /Users/user/testproject/ worked (and it tab-completed to C:\Users\...). So backslashes/forward slashes mostly works
The usual hotkey control-backquote doesn't work to open the terminal.
I click the "version control" tab on the side. It says "Install git, a popular ..." with a big "Download Git for Windows" button. So Git installation separately is needed, but it is guided.
Click "Download git for windows". It launches a web browser to the Git for windows site. Follow those instructions (same as we have now).
I did select "use VSCode as an editor for git" (instead of Nano)
I go back to vscode. git doesnt' work from the terminal, and it still prompts me to download Git. Probably OK: this is probably because of PATH.
Exit and restart vscode. Now it works: git appears in the terminal and in the "version control" browser.
Let's try using it:
I had made a blank testproject.
I can click "Initialize repository" in the VCS tab. It also shows something about Github, which I didn't click yet.
I add some files
I go to the VCS tab and add the files. I cilkc "commit" and it says "Make sure you configure your "user.name" and "user.email" in git. The dialog says it comes from VSCode itself. It doesn't let me commit until I fix this.
If I enter a message in the VCS commit sidepanel, it commits directly
If I don't enter a commit message, it starts a new vscode tab where I can edit the message (I guess it did this since I told it to use vscode as an editor). This basically does what we want: you can edit the message, and the git process waits until you close the tab.
If, from the terminal, I git config --global --edit, it starts a tab in vscode. As expected. If I remove the core.editor config, then it starts the editor in the terminal (vi by default)
I can change the core.editor to nano and it works with nano. Changing back to the default value opens in vscode again.
Setting core.editor to code --wait (no quotes) also works to launch within the vscode tab.
But if core.editor is unset and I click "commit" from the sidebar, it does launch the editor in the a vscode tab. I wonder if vscode is overriding the editor option on the command line directly (I couldn't find a way to inspect the processes enough to see how it was started).
Misc screenshots (these may be used, I claim there is no creative work so no copyright by me. But it might be better to re-generate unless it's windows-specific):
This describes what I observed, for future reference.
Date: 2024-03-05 Windows 10 Pro Education, standalone installation (not university managed)
pwd
,cd /
,cd /Users/user/testproject/
worked (and it tab-completed toC:\Users\...
). So backslashes/forward slashes mostly worksgit
doesnt' work from the terminal, and it still prompts me to download Git. Probably OK: this is probably because of PATH.git
appears in the terminal and in the "version control" browser.Let's try using it:
git config --global --edit
, it starts a tab in vscode. As expected. If I remove thecore.editor
config, then it starts the editor in the terminal (vi by default)core.editor
tonano
and it works with nano. Changing back to the default value opens in vscode again.core.editor
tocode --wait
(no quotes) also works to launch within the vscode tab.core.editor
is unset and I click "commit" from the sidebar, it does launch the editor in the a vscode tab. I wonder if vscode is overriding the editor option on the command line directly (I couldn't find a way to inspect the processes enough to see how it was started).Output of
git config --list --show-origin
:Misc screenshots (these may be used, I claim there is no creative work so no copyright by me. But it might be better to re-generate unless it's windows-specific):
VCS sidebar icon:
New terminal:
Download git for windows:
Git defaults:
Warning to configure username and email: