git 常用命令
我的常用git命令近期在频繁使用git很多命令不熟练,记录和学习一下 分支操作 创建与切换分支  1234git branch                   # 查看本地所有分支git branch <branch-name>     # 创建新分支(不切换)git checkout <branch-name>   # 切换到已有分支git checkout -b <branch-name>  # 创建并切换到新分支(常用!)  分支合并  123git merge <branch-name>      # 将指定分支合并到当前分支git merge --no-ff <branch-name>  # 强制生成合并提交(保留分支历史)git rebase <branch-name>     # 变基(将当前分支的提交“移植”到目标分支)  删除分支  123git branch -d <branch-name>  # 删除本地分支(已合并的分支)git branch -D...
ssh
Ubuntu 使用 SSH 创建公私钥1. 打开终端首先,打开你的 Ubuntu 终端。 2. 生成 SSH 密钥对使用 ssh-keygen 命令生成 SSH 密钥对。默认情况下,密钥会生成在 ~/.ssh/ 目录下。以下命令使用 Ed25519 算法(更现代且安全,推荐使用),并添加注释: 1ssh-keygen -t ed25519 -C "your_email@example.com"  参数说明:  -t ed25519:指定密钥类型为 Ed25519(更高效,推荐使用)。注意,原博客中错误地将 -t ed_25519 写成了 ed_25519,且 Ed25519 不需要 -b 4096 参数,因为它固定使用 256 位。 -C "your_email@example.com":添加注释,通常使用你的电子邮件地址。  如果需要使用 RSA 算法(例如,某些旧系统不支持 Ed25519),可以使用以下命令: 1ssh-keygen -t rsa -b 4096 -C...
hexo初始化使用文档
hexo 环境准备hexo文档 12345npm init -y # 初始化npmnpm install -g hexo-cli # 可以使用全局hexo init xhyblogcd xhyblogbun install #  Butterfly 安装依赖Butterfly文档 1234# 安装 Butterfly 主题# 在项目目录下运行以下命令,克隆 Butterfly 主题到 themes/butterfly 目录:# /xhyblog 中 git clonegit clone -b master https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly  Butterfly 主题依赖 Pug 和 Stylus 渲染器,需要安装以下插件: 1bun add hexo-renderer-pug hexo-renderer-stylus --save 配置主题 打开 Hexo 的配置文件 _config.yml,将主题设置为 butterfly: 1theme:...
Docker 部署 minio 最佳实践
minio 的docker compose1234567891011121314151617version: "3.7"services:  minio:    image: "quay.io/minio/minio:RELEASE.2022-08-02T23-59-16Z"    ports:      - "2590:2590"      - "2591:2591"    volumes:      - "./minio/data1:/data1"      # - "./minio/data2:/data2"    environment:      - MINIO_ROOT_USER=minioadmin      -...
Docker 部署 Nginx 最佳实践
123456789101112131415161718192021version: '3'services:  nginx:    restart: always    container_name: nginx    image: nginx    ports:      - 80:80      - 443:443    volumes:      - ./website/html:/usr/share/nginx/html      #- /usr/local/nginx/www:/var/www      #- /usr/local/nginx/logs:/var/log/nginx      # 有可能会出现不能挂载,这个时候用手动拷贝配置文件就行      - ./nginx.conf:/etc/nginx/nginx.conf      #- /usr/local/nginx/etc/cert:/etc/nginx/cert      #- /usr/local/nginx/conf.d:/etc/nginx/conf.d   ...
