开发环境搭建

167 阅读1分钟

VSCode安装和初始化配置

step1 Chinese (Simplified) (简体中文) Language Pack for Visual Studio Code

step2 按下Ctrl+Shift+P

配置用户名和邮箱

git config --global user.name "用户名"

git config --global user.email "邮箱地址"

生成密钥

ssh-keygen -t rsa -C “上一步的邮箱地址”

查看公钥

cd ~/.ssh && ls && cat id_rsa.pub

克隆仓库

git clone 仓库地址

查看文件状态

git status

添加修改文件

git add -A

提交改动内容到本地仓库

git commit -m‘提交说明'

推送改动内容到远程仓库

git push origin [分支名]

图形操作

撤销修改

在GitHub上配置公钥

将GitBash设置为VSCode默认打开的终端

"terminal.integrated.profiles.windows": {
        // 命名中不能有空格
        "GitBash": {
          "path": "C:/Program Files/Git/bin/bash.exe",
          "args": [],
          "icon": "terminal-bash"
        },
        "PowerShell": {
          "source": "PowerShell",
          "icon": "terminal-powershell"
        },
        "Command Prompt": {
          "path": ["${env:windir}\Sysnative\cmd.exe", "${env:windir}\System32\cmd.exe"],
          "args": [],
          "icon": "terminal-cmd"
        }
      },

    "terminal.integrated.defaultProfile.windows": "GitBash",
"terminal.integrated.profiles.windows": {
        // 命名中不能有空格
        "GitBash": {
          "path": "C:/Program Files/Git/bin/bash.exe",
          "args": [],
          "icon": "terminal-bash"
        },
        "PowerShell": {
          "source": "PowerShell",
          "icon": "terminal-powershell"
        },
        "Command Prompt": {
          "path": ["${env:windir}\Sysnative\cmd.exe", "${env:windir}\System32\cmd.exe"],
          "args": [],
          "icon": "terminal-cmd"
        }
      },

    "terminal.integrated.defaultProfile.windows": "GitBash",