博客常用指令
rvm gemset切换:
rvm use 2.7.0@jekyll
rvm use 2.7.0@rails
blog 推送的操作:
github master
已经换成了 main
git checkout -b gh-pages
git add .
git commit -m "sailing race"
git push origin gh-pages
symphonyh.io推送的操作:
git add .
git commit -m "XXX"
git push origin main
清理ubuntu:
sudo apt-get autoclean 清理旧版本的软件缓存
sudo apt-get clean 清理所有软件缓存
sudo apt-get autoremove 删除系统不再使用的孤立软件
设置git命令
git config --global user.name "h***h@outlook.com"
git config --global user.name "symphonyh"
git config --global color.ui auto
git config --global credential.helper store 提交不再每次输入密码
查看git设置:
git config --list
生成公匙:
ssh-keygen -t rsa -C "h***h@outlook.com"
生成公匙,就是 id_rsa.pub 这个文件,里面内容要写入GitHub的 SSH
验证公匙:
ssh -T git@github.com
获取远程库:
git clone https://github.com/symphonyh/blog.git
git clone https://github.com/symphonyh/symphonyh.github.io
token 验证:
git remote set-url origin https:// token @github.com/symphonyh/symphonyh.github.io.git
git remote set-url origin https:// token @github.com/symphonyh/blog.git
需要将token替换为实际值
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?