1. 同步到本地
1. 在本地的文件夹,ctrl+shift+p,建立sftp.json文件,填写如下(xxx处需填写自己的信息)
{
"name": "My Server",
"host": "xxxxx",
"protocol": "sftp",
"port": 22,
"username": "xxx",
"privateKeyPath":"xxxxx",
"remotePath": "xxxxx",
"uploadOnSave": false,
"useTempFile": false,
"openSsh": false
}
2. 在资源管理器,鼠标右键,sync Remote>Local,同步到本地。
2.与gitee连接
可以远程直接连接,但是考虑了一下,选择还是用之前的本地连接。
首先在本地文件夹git bush,按照gitee提示初始化并提交本地项目,注意添加.gitignore:
git config --global user.name ...
git config --glabal user.email ...
git init
git add .
git commot -m 'v1'
git remote add origin ...
git push origin main
然后再在vscode端操作:
1.在本地文件夹中,点开git插件
2.暂存
3.提交
4.推送