git config --global user.name "Your Name"
git config --global user.email "email@example.com"
git init
git clone <url>
git add <file>
git add .
git commit -m "消息"
git status
git log
git log --oneline
git remote add origin <url>
git push origin main
git pull origin main
git branch
git branch <分支名>
git checkout <分支名>
git checkout -b <分支名>
git merge <分支名>
git restore <file>
git restore --staged <file>
git reset --hard HEAD^
git revert <commit-id>
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub
ssh -T git@github.com
git config --global url."git@github.com:".insteadOf "https://github.com/"
npx create-react-app my-app
npm init react-app my-app
最常用。启动本地开发服务器,通常在 http://localhost:3000 运行。代码修改后会自动热更新
npm start
npm test
npm run build
npm run eject
npm install
npm create vite@latest
npm create vite@latest my-react-app -- --template react
npm create vite@latest my-react-app -- --template react-ts
yarn create vite my-react-app --template react
pnpm create vite my-react-app --template react
最常用。启动本地开发服务器,默认在 http://localhost:5173 运行,支持热更新(HMR)
npm run dev
npm run preview
npm run build
npm run lint
npm install
npm install -D tailwindcss
node -v
node --version
npm -v
npm --version
npm init
npm init -y
npm install <package-name>
npm install -g <package-name>
npm install --save-dev <package-name>
npm install
npm update <package-name>
npm uninstall <package-name>
npm list
npm list -g --depth=0
node <filename.js>
node
npm start
npm run <script-name>
node --inspect <filename.js>
node --inspect-brk <filename.js>
npx <command>
npm info <package-name>
python --version
python script.py
exit()
quit()
pip install <package-name>
pip list
pip uninstall <package_name>
pip freeze > requirements.txt
pip install -r requirements.txt
python -m venv myenv