Welcome to PhYsiX Space

Try to set up a place to store notes

0%

Git setup

Git安装

default editor: Sublime Text
name repository: Override the default branch name for new repositories, `main`
environment variable: Git from the command line and also from 3rd-party software
SSH executable: Use bundled OpenSSH
HTTPS transport backend: Use the OpenSSL library

Node.js安装

winget install Schniz.fnm
fnm install 22
node -v
npm -v

一些troubleshoot命令

Get-Command fnm -ErrorAction SilentlyContinue
$env:Path -split ";" | Where-Object { $_ -match "fnm" }
fnm env | Out-String | Invoke-Expression
where.exe npm
路径\npm.cmd -v
$env:Path -split ";" | Where-Object { $_ -match "npm" }

最终放弃,安装prebuilt版本

fnm list
fnm uninstall 22

接着卸载 fnm 和 winget

安装完 Node.js 后 git init? 安装 hexo,npm install -g hexo-cli

然后安装 pandoc,正常操作就没问题了。部署方面:

npm i hexo-deployer-git (直接npm install比较快,可能npm audit fix)
git config --global user.name "用户名"
git config --global user.email "邮箱地址"
ssh-keygen -t rsa -C "邮箱地址"
cat ~/.ssh/id_rsa.pub
ssh -T git@github.com

测试Git

git remote -v
git config --global --add safe.directory 所需目录
git remote -v

补充

反引号 Alt + 小键盘96 `