git 分支操作常用命令

查看所有分支 $ git branch -a 查看远程分支 $ git branch -r 查看本地分支所关联的远程分支 $ git branch -vv 重命名本地分支 $ git branch -m old_branch new_branch 删除远程分支 $ git branch -d -r origin/old_branch $ git push origin :old_branch 推送新的分支 $ git push -u origin new_branch 设置关联 $ git branch --set-upstream-to=origin/branch branch

2024-01-04 · 1 分钟 · duanhongjin

Hugo + Github Pages 建站

00 安装Hugo 到 Hugo Releases 下载对应的操作系统版本的 Hugo 二进制文件 Mac 下可以直接使用 Homebrew 安装: $ brew install hugo 01 生成站点 使用 Hugo 快速生成站点 $ hugo new site /path/to/site 这样就在 /path/to/site 目录里生成了初始站点,进入目录: $ cd /path/to/site 02 安装主题 到 主题列表 挑选主题,找到相关的 GitHub 地址,创建目录 themes, 把主题 clone 下来 $ git clone https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod 在配置文件中设置主题名字 theme:...

2023-12-25 · 2 分钟 · duanhongjin
隐私政策 | 联系我们