Adds a git command to the Wash terminal.
Use it to work with local repositories where Git is not installed, or in VSCode for Web (vscode.dev) with a local folder open. No Git installation is required.
A commit needs an author name and email address. Set them for each repository with git config, or with the GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL environment variables.
Supported commands
Command
Description
git init [-b <branch>] [<dir>]
Create a repository. The default branch is main
git status [-s]
Show the working tree status
git add <path>..., git add -A
Add changes to the index, including deleted files
git rm [--cached] [-r] <path>...
Remove files from the working tree and the index
git restore [--staged] <path>...
Discard changes in the working tree, or unstage with --staged
Some browsers restrict writes to .git in local folders opened in VS Code for the Web. If initialization is blocked, run git init in a local terminal. The browser may still restrict operations such as changing repository configuration.
Remote operations such as clone, fetch, pull, and push are not supported. For GitHub repositories, use the GitHub Repositories extension in VSCode for Web