vscode使用tmux技巧

  1. 生成会话
shell 复制代码
tmux
tmux new -s <session-name>
  1. 退出当前会话
shell 复制代码
tmux detach
exit
  1. 查看有什么会话
shell 复制代码
tmux ls
  1. 再次链接会话
shell 复制代码
tmux attach -t <session-name>
  1. 删除会话
shell 复制代码
tmux kill-session -t <session-name>
  1. 重命名会话
shell 复制代码
tmux rename-session -t <new-name>
  1. 切换会话
shell 复制代码
tmux switch -t <session-name>

回溯log ctl+b 上下键

复制代码

git stash

临时保存工作区和暂存区的修改

典型使用场景包括

  1. 当你正在一个分支上开发,突然需要切换到另一个分支处理紧急问题,但当前修改还没完成不想提交
  2. 需要拉去远程最新代码,但本地i修改与远程有冲突
  3. 想临时回答某个干净状态测试或查看代码

常用操作:

保存当前修改

bash 复制代码
git stash

会把工作区和暂存区的修改保存到一个 "储藏栈" 中,工作区恢复到最近一次提交的状态

查看储藏列表

bash 复制代码
git stash list

会显示所有保存的储藏,格式类似:stash@{0}: WIP on 分支名: 提交哈希 提交信息

恢复最近的储藏

bash 复制代码
git stash apply  # 恢复后,储藏仍会保留在栈中
# 或
git stash pop    # 恢复后,会删除该储藏(推荐日常使用)

恢复指定的储藏

bash 复制代码
git stash apply stash@{n}  # n是储藏的编号,如stash@{1}

删除指定储藏

bash 复制代码
git stash drop stash@{n}

删除所有储藏

bash 复制代码
git stash clear

使用huggingface下载模型

  1. 本地 git clone 下载

    git clone 网址(modelcard)

  2. 服务器镜像下载

shell 复制代码
pip install -U huggingface_Hub

设置环境变量

shell 复制代码
export HF_ENDPOINT=https://hf-mirror.com
shell 复制代码
export HF_ENDPOINT=https://hf-mirror.com && huggingface-cli download --resume-download gpt2 --local-dir gpt2
  1. modelscope下载
shell 复制代码
pip install modelscope

命令行下载

shell 复制代码
modelscope download --model llava-hf/llava-1.5-7b-hf ....

SDK下载

复制代码
#模型下载
from modelscope import snapshot download
model dir =snapshot download('llava-hf/llava-1.5-7b-hf')

git下载

shell 复制代码
git lfs install
git clone https://www.modelscope.cn/llava-hf/llava-1.5-7b-hf

如果您希望跳过 Ifs 大文件下载,可以使用如下命令

shell 复制代码
GIT LFS SKIP SMUDGE=1 git clone https://www.modelscop
相关推荐
EvenBoy15 小时前
IDEA中使用Claude Code
java·ide·intellij-idea
赖念安15 小时前
在 vscode 的 NPM SCRIPTS 面板点击执行后脚本失败
ide·vscode·npm
wzb5615 小时前
把 Vim 打造成 Nginx 开发 / 调试 IDE(WSL Ubuntu 完整教程)
linux·ide·nginx·ubuntu·vim·c/c++
golang学习记16 小时前
VS Code官宣:全面支持Rust!
开发语言·vscode·后端·rust
Three~stone16 小时前
Visual Studio Code 2025 安装教程以及汉化教程
ide·vscode·编辑器
全栈小516 小时前
【开发工具】Visual Studio 2022开发工具能够集成灵码这些AI插件吗?
ide·人工智能·visual studio
拆房老料16 小时前
从 Euro-Office 说起:Office 不是编辑器,是一套复杂系统工程
前端·编辑器·开源软件·开源协议
原来是猿16 小时前
vscode下载+插件
ide·vscode·编辑器
lovingsoft16 小时前
VSCode+Claude Code+Playwright-MCP 配置实操|零踩坑,1分钟打通AI浏览器自动化
人工智能·vscode·自动化
ZTL-NPU1 天前
Jetbrains开发ros
ide·python·pycharm·编辑器·ros·clion