【Hexo博客搭建】将其部署到GitHub Pages(二):如何初始化并部署?

2023-10-27

系列目录

【Hexo博客搭建】将其部署到 GitHub Pages(一):前期要做哪些准备?

【Hexo博客搭建】将其部署到 GitHub Pages(二):如何初始化并部署?

【Hexo博客搭建】将其部署到 GitHub Pages(三):怎么写作以及更新?

简介: 本系列文章属于半笔记半教程的零基础小白入门文,教你将 Hexo 部署到 GitHub Pages 的前期需要做哪些准备,跟着此系列文章最终可以获得自己的静态博客网站。流程很长,分成不同的篇幅,此为本系列的第二篇。

前言

​ 本系列文章属于半笔记半教程的零基础小白入门文,教你将 Hexo 部署到了 GitHub Pages,从而获得自己的静态博客网站。流程很长,分成不同的篇幅,此为本系列的第二篇。

步骤

六、初始化 Hexo 工程

注意:接下来应该是你自己的自定义的目录,请不要完全复制粘贴我的!

比如说我是Windows用户,想把我的网站代码储存在

电脑 E 盘的 Hexo 文件夹下

那么我要先在E盘建立相应的文件夹,然后再继续操作。

由于cmd终端最开始默认在C盘操作,我得先切换到E盘,那么我要输入 E: 然后回车,即:

Microsoft Windows [版本 10.0.19042.1165]
(c) Microsoft Corporation。保留所有权利。

C:\Users\10272>E:

E:\>

然后此时,我要通过 cd 进入我本地电脑打算存储网站代码的文件夹目录。(或者右键文件夹 Git Bash Here),即 Hexo 文件夹里

也就是说我需要输入 cd Hexo 然后回车,我会看到:

E:\>cd Hexo

E:\Hexo>

好了成功进入,接下来输入下方代码,再按回车:

hexo init blog

hexo :正是因为我们之前安装了 hexo-cli 这一个包,所以我们可以在终端中使用 hexo 这一命令。

init :用来初始化博客的模版文件。后面跟的是你要新建的文件夹比如我的是:blog

然后我会看到

E:\Hexo>hexo init blog
INFO  Cloning hexo-starter https://github.com/hexojs/hexo-starter.git
[32mINFO [39m Install dependencies
added 242 packages from 207 contributors in 105.871s
15 packages are looking for funding
  run `npm fund` for details
INFO  Start blogging with Hexo!
E:\Hexo>

下面通过 cd 进入我的博客文件夹,

即输入 cd blog 后按回车,我会看到:

E:\Hexo>cd blog
E:\Hexo\blog>

现在我就是处于 E:\Hexo\blog 文件夹下操作了,

现在在这个文件夹内默认安装所有 package.json 文件中提到的包,

即输入 npm install 然后回车,我会看到:

E:\Hexo\blog>npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
audited 243 packages in 4.956s
15 packages are looking for funding
  run `npm fund` for details
found 0 vulnerabilities
E:\Hexo\blog>

这时候,我的 blog 文件夹里面会多出一堆文件,

文件夹结构应该大致是这样:

.
├── config.yml
├── package.json
├── scaffolds
├── source
|  ├── _drafts
|  └── _posts
└── themes

现在我们输入 hexo server 然后回车,会看到:

E:\Hexo\blog>hexo server
INFO  Validating config
INFO  Start processing
INFO  Hexo is running at http://localhost:4000 . Press Ctrl+C to stop.

server 代表开启本地的 Hexo 服务器,这时你就可以打开浏览器,在地址栏中输入 localhost:4000 就可以看到本地的网页了。

在这里插入图片描述

这个网页就是Hexo为你自动生成的博客页面。

Ctrl+C 中断服务器的运行,

系统提示 终止批处理操作吗(Y/N)? 输入 Y 然后回车。

至此,基础的模版页面便已经搭建好了。

七、生成静态文件

到现在,我们的工作都是在本地进行,想必你也很想放到线上与小伙伴们分享。这便轮到了 GitHub Pages 的出场,不过 GitHub Pages 只支持纯静态文件。

所以我们需要使用下面一行命令先来生成站点的静态文件。

(如果进行多次生成,为了避免受错误缓存影响,最好使用 hexo clean 先清除一遍。)
hexo generate
(上方命令也可以缩写为 hexo g)

输入后回车,我会看到:

E:\Hexo\blog>hexo g
INFO  Validating config
INFO  Start processing
INFO  Files loaded in 209 ms
INFO  Generated: archives/index.html
INFO  Generated: archives/2021/index.html
INFO  Generated: archives/2021/08/index.html
(node:20772) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:20772) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:20772) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:20772) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:20772) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:20772) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
INFO  Generated: index.html
INFO  Generated: fancybox/jquery.fancybox.min.css
INFO  Generated: js/script.js
INFO  Generated: 2021/08/25/hello-world/index.html
INFO  Generated: css/style.css
INFO  Generated: css/fonts/fontawesome-webfont.woff2
INFO  Generated: css/fonts/fontawesome-webfont.woff
INFO  Generated: fancybox/jquery.fancybox.min.js
INFO  Generated: css/fonts/fontawesome-webfont.ttf
INFO  Generated: css/fonts/FontAwesome.otf
INFO  Generated: css/fonts/fontawesome-webfont.eot
INFO  Generated: js/jquery-3.4.1.min.js
INFO  Generated: css/images/banner.jpg
INFO  Generated: css/fonts/fontawesome-webfont.svg
INFO  17 files generated in 1.98 s
E:\Hexo\blog>

此时我的文件夹目录下会出现 public 这个文件夹,里面存放的就是我的站点的静态文件。

八、与远程仓库建立关联

接下来我们将本地的仓库与此前在 GitHub 上建立的仓库建立关联。

输入 git init 初始化 Git 仓库,只需要执行一次即可,看到:

E:\Hexo\blog>git init
Initialized empty Git repository in E:/Hexo/blog/.git/

在将其部署到 GitHub Pages 上之前,我们最好先建立一个分支。

什么是分支?

Git 提供了版本管理功能,其中还有一个分支功能,你现在可以简单地将其理解为平行世界。

用户名.github.io 部署后,GitHub Pages 将默认使用你的 main分支(以前叫 master分支,一个意思,主要分支的意思)作为静态文件部署。所以我们最好新建一个 hexo 分支(命名无所谓)用来存储 Hexo 地源代码,main 分支则用来存储部署后的静态文件。为了方便,不想其他名字了,这个分支我就起名叫 hexo 吧。

新建该分支的命令语句是 git checkout -b hexo ,然后回车,可以看到:

E:\Hexo\blog>git checkout -b hexo
Switched to a new branch 'hexo'
E:\Hexo\blog>

这时便成功建立了一个 hexo 分支。(此后的工作都将在 hexo 分支下进行)

你可以通过 git branch -v 来查看当前有哪些分支,使用 git checkout 分支名 来切换到对应的分支。

Git 学习笔记

九、部署到 GitHub Pages

为了更方便的部署到 GitHub Pages,Hexo 提供了 hexo-deployer-git 插件。

老规矩,安装该插件,要输入下面命令,

npm install hexo-deployer-git --save

回车后可以看到

E:\Hexo\blog>npm install hexo-deployer-git --save
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ hexo-deployer-git@3.0.0
added 1 package from 1 contributor and audited 244 packages in 8.166s
15 packages are looking for funding
  run `npm fund` for details
found 0 vulnerabilities
E:\Hexo\blog>

下面对 blog 文件夹下的 _config.yml 文件进行配置。

右键 _config.yml ,打开方式选VS Code(或者直接用VS Code打开该文件),

滑到最下面,把关于

# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:' '

的这段代码补充为

# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
  type: git
  repo: https://github.com/aizhiqian/aizhiqian.github.io.git   #仓库地址
  branch: main  # 默认使用 master 分支(Github现在改名为main分支)
  message: Update Hexo Static Content # 你可以自定义此次部署更新的说明说明

Ctrl+S保存,退出VS Code,部署!

终端里输入命令 hexo deploy 后(或者缩写为 hexo d )回车,我的电脑显示:

E:\Hexo\blog>hexo deploy
INFO  Validating config
INFO  Deploying: git
INFO  Setting up Git deployment...
Initialized empty Git repository in E:/Hexo/blog/.deploy_git/.git/
Author identity unknown
*** Please tell me who you are.
Run
  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got '10272@DESKTOP-N3PNS7C.(none)')
FATAL {
  err: Error: Spawn failed
      at ChildProcess.<anonymous> (E:\Hexo\blog\node_modules\hexo-util\lib\spawn.js:51:21)      at ChildProcess.emit (events.js:400:28)
      at ChildProcess.cp.emit (E:\Hexo\blog\node_modules\cross-spawn\lib\enoent.js:34:29)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) {
    code: 128
  }
} Something's wrong. Maybe you can find the solution here: %s https://hexo.io/docs/troubleshooting.html
E:\Hexo\blog>

是的,部署出错(FATAL)了,“ Please tell me who you are.”

原来是创建git文件夹的时候信息不完善导致的,

它提示我需要运行(Run)下面两行程序,来设置我帐户的默认标识。

git config --global user.email “you@example.com”

git config --global user.name “Your Name”

注意双引号前有空格,邮箱随便填也可以,比如QQ邮箱啥的,

我用的这个邮箱查找路径是:点击Github主页右上角头像,点击settings,点击Emails,然后就能找到Github的这个邮箱了

那么我分别输入这两个命令按回车,可见下方代码:

E:\Hexo\blog>git config --global user.email "你的邮箱"
E:\Hexo\blog>git config --global user.name "用户名"
E:\Hexo\blog>

再用命令 *git config -l* 查看所有的配置信息

E:\Hexo\blog>git config -l
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
http.sslbackend=openssl
http.sslcainfo=E:/Git/mingw64/ssl/certs/ca-bundle.crt
core.autocrlf=true
core.fscache=true
core.symlinks=false
pull.rebase=false
credential.helper=manager-core
credential.https://dev.azure.com.usehttppath=true
init.defaultbranch=master
user.email=你的邮箱
user.name=用户名
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
E:\Hexo\blog>

可以看见下面这两条信息,代表信息以及完善上去了

user.email=你的邮箱

user.name=用户名

那我们接着部署吧!

终端里输入命令 hexo deploy 后(或者缩写为 hexo d )回车,我的电脑再次报错:

E:\Hexo\blog>hexo deploy
INFO  Validating config
INFO  Deploying: git
INFO  Clearing .deploy_git folder...
INFO  Copying files from public folder...
INFO  Copying files from extend dirs...
warning: LF will be replaced by CRLF in 2021/08/25/hello-world/index.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in archives/2021/08/index.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in archives/2021/index.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in archives/index.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in css/fonts/fontawesome-webfont.svg.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in css/style.css.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in fancybox/jquery.fancybox.min.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in index.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in js/jquery-3.4.1.min.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in js/script.js.
The file will have its original line endings in your working directory
[master (root-commit) a9fc5f8] Update Hexo Static Content
 17 files changed, 5174 insertions(+)
 create mode 100644 2021/08/25/hello-world/index.html
 create mode 100644 archives/2021/08/index.html
 create mode 100644 archives/2021/index.html
 create mode 100644 archives/index.html
 create mode 100644 css/fonts/FontAwesome.otf
 create mode 100644 css/fonts/fontawesome-webfont.eot
 create mode 100644 css/fonts/fontawesome-webfont.svg
 create mode 100644 css/fonts/fontawesome-webfont.ttf
 create mode 100644 css/fonts/fontawesome-webfont.woff
 create mode 100644 css/fonts/fontawesome-webfont.woff2
 create mode 100644 css/images/banner.jpg
 create mode 100644 css/style.css
 create mode 100644 fancybox/jquery.fancybox.min.css
 create mode 100644 fancybox/jquery.fancybox.min.js
 create mode 100644 index.html
 create mode 100644 js/jquery-3.4.1.min.js
 create mode 100644 js/script.js
fatal: unable to access 'https://github.com/Barry-Flynn/blog/': OpenSSL SSL_read: Connection was reset, errno 10054
FATAL {
  err: Error: Spawn failed
      at ChildProcess.<anonymous> (E:\Hexo\blog\node_modules\hexo-util\lib\spawn.js:51:21)      at ChildProcess.emit (events.js:400:28)
      at ChildProcess.cp.emit (E:\Hexo\blog\node_modules\cross-spawn\lib\enoent.js:34:29)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) {
    code: 128
  }
} Something's wrong. Maybe you can find the solution here: %s https://hexo.io/docs/troubleshooting.html
E:\Hexo\blog>

又报错了?我很晕。问了群里大佬,说可能是国内的墙导致的网络问题。好吧,免费的那个什么软件工具果然不太靠谱。解决该问题并重新连接后第三次输入命令 hexo deploy ,回车

E:\Hexo\blog>hexo deploy
INFO  Validating config
INFO  Deploying: git
INFO  Clearing .deploy_git folder...
INFO  Copying files from public folder...
INFO  Copying files from extend dirs...
warning: LF will be replaced by CRLF in 2021/08/25/hello-world/index.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in archives/2021/08/index.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in archives/2021/index.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in archives/index.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in css/fonts/fontawesome-webfont.svg.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in css/style.css.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in fancybox/jquery.fancybox.min.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in index.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in js/jquery-3.4.1.min.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in js/script.js.
The file will have its original line endings in your working directory
On branch master
nothing to commit, working tree clean
info: please complete authentication in your browser...
Enumerating objects: 31, done.
Counting objects: 100% (31/31), done.
Delta compression using up to 4 threads
Compressing objects: 100% (25/25), done.
Writing objects: 100% (31/31), 882.21 KiB | 4.98 MiB/s, done.
Total 31 (delta 3), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (3/3), done.
To https://github.com/Barry-Flynn/blog
 + 4b62927...a9fc5f8 HEAD -> main (forced update)
Branch 'master' set up to track remote branch 'main' from 'https://github.com/Barry-Flynn/blog'.
[32mINFO [39m Deploy done: [35mgit[39m
E:\Hexo\blog>

成功了!Ohhhhhhhhhhh~

等待完成后,打开网址 https://用户名.github.io 就能看到你的线上网站了!

使用 https,http 可能无法正常打开。HTTPS 是多了安全加密的 HTTP,Chrome 浏览器已经默认会显示 http 链接为不安全。

为了安全,建议开启强制 https 跳转。项目地址页面 -> Settings -> Options -> GitHub Pages -> Enforce HTTPS。(翻到下面)

此时,http 网址会自动重定向到 https

十、备份与自动部署

我们当前只是将生成的静态文件部署到了云端。

为了以防万一,我们应该将网站的源代码文件也推送到 GitHub 仓库备份。

输入下方代码按回车,与远程 Git 仓库建立连接,只此一次即可

git remote add origin https://github.com/用户名/用户名.github.io

若输入错误,可以运行输入 git remote rm origin 删除远程地址,

然后再输入一遍正确的命令与远程 Git 仓库建立连接,之后就行了。

接下来准备提交,这三句命令将是你以后每次备份所需要输入。

(括号内为注释,不用输入哈!)

(添加到缓存区)
git add .
(这次做了什么更改,简单描述下即可)
git commit -m 'backup'
(第一次提交时,你可能需先运行下面命令设置一下默认提交分支)
(git push --set-upstream origin hexo)
(推送至远程仓库)
git push

之后写文章可以在该项目下写,与之前一样,只不过这里同时管理了两个分支。

main -负责展示静态网页

hexo -备份本地hexo文件

main分支更新

hexo d

hexo分支更新

git add . #添加所有文件到暂存区
git commit -m "新增博客文章"  #提交
git push origin hexo #推送hexo分支到Github

总结

好了,这就是本篇文章:

【Hexo博客搭建】将其部署到 GitHub Pages(二):如何初始化并部署?

的全部内容了,更多内容会很快写出来,尽情期待。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

【Hexo博客搭建】将其部署到GitHub Pages(二):如何初始化并部署? 的相关文章

  • 如何禁用 GitHub 中的拉取请求?

    我试图了解如何禁用 github 中的 拉取请求 问题一 我们正在尝试使用变基工作流程 这意味着如果不是快速推进 那么使用拉取请求可能会有害 一种解决方案 为我想要禁用拉取请求的分支设置分支权限 或者将我添加为任何进入 master 的内容
  • 将“复制到剪贴板”添加到 GitHub markdown 的简单方法?

    具体来说 我有一些用于安装的代码块 我希望用户能够快速将其复制并粘贴到终端中 我想要一个用于代码块 复制到剪贴板 的按钮 由于 git 克隆 URL 有一个 复制到剪贴板 按钮 我想知道我是否可以利用该按钮 或者如果不能 是否可以将一些相对
  • 执行 git Push 时出现“diff.renamelimit 变量”警告

    我将本地提交推送到远程 git 服务器并收到以下警告消息 remote warning only found copies from modified paths due to too many files remote warning y
  • 在 .gitconfig 中隐藏 GitHub 令牌

    我想将所有点文件存储在 GitHub 上 包括 gitconfig 这需要我将 GitHub 令牌隐藏在 gitconfig 中 为此 我有一个 gitconfig hidden token 文件 这是我打算编辑并放在隐藏令牌的 git 下
  • GitHub Pages (github.io) doxygen 生成的页面未找到 (404)

    我不明白为什么找不到 doxygen 生成的页面 404 它在Github存储库中的路径是https github com AubinMahe AubinMahe github io blob master doxygen html dd
  • 为别名命令添加“git help”?

    我已经实现了一个 Git 命令并使用 git 别名将其连接到 Git 但是有没有办法连接 Git 帮助 我在 Windows 上运行 如果我发出git help mycmd我收到一个弹出窗口 告诉我 Git 找不到 git mycmnd h
  • Git:以新名称签出旧版本的目录

    如何以新名称查看目录的先前版本 我一直都有一个目录foo在我的仓库中 我想创建一个目录foo old在我当前的工作树中 其内容是HEAD 2 foo 我同时需要两个版本 以确保它们给出相同的结果 测试这需要相当多的代码 并且需要同时提供两个
  • GIT 和 Ruby:如何从 ruby​​ 脚本内部取消设置 GIT_DIR 变量?

    我编写了一个非常简单的 部署 脚本作为我的post update挂钩到我的裸 git 存储库中 变量如下 live domain mydomain com staging domain stage mydomain com git repo
  • 如何在同一存储库中的 github 操作之间共享代码?

    假设我想要两个工作流程build yml and release yml在我的仓库中 第一个应该构建项目 假设使用 CMake 第二个应该构建项目并使用构建的二进制文件创建 GitHub 版本 项目构建代码在两个文件之间重复 如何在它们之间
  • 为什么cherry-pick 告诉我所有行都已更改?

    Updated 考虑文件 abc 在提交 A 和 B 中都相同 begin 123 456 789 klm end 在A中 我们重构第一行123 gt AAA并在结果之上选择 B Git 告诉我们all lines in the file
  • 合并后 Git 分支和提交历史记录

    我正在开发一个项目 单独 对于我开发的每个功能 我都会创建一个新分支 处理该功能 然后将其合并到 master 中 所以通常我不会同时在两个不同的分支上工作 也不会在一个分支上工作时接触master 当我合并一个分支时 我看到 使用gitx
  • 创建多个 git 分支的联合分支

    我希望能够在现有分支之上分层其他分支 并独立修改这些分支 这很有用 例如 允许将各个子项目的二进制文件统一到同一个项目中bin目录 一般来说 给定的文件仅存在于一层中 理想情况下 我想我会使用 unionfs 来完成此任务 但它必须以某种方
  • 在种子项目上构建时如何组织 git 存储库

    我正在基于从 github 克隆的种子项目 MEAN io 构建一个网站 如何将这些文件与我自己的文件分开 由于该种子提供了广泛的文件框架 因此我自己的文件分布在整个项目中 我希望能够从种子中提取更新 但不能将其与我添加的文件混合 我知道我
  • Git 删除其他人从远程所做的最后提交

    所以 我的情况是 错误地 我已经授予某人对我的分支的承诺 现在 在我的本地 我已经进行了提交 当我尝试将其推送到远程时 它显示远程在前面 因为对方已经将他的代码推送到了这个分支并进行了多次提交 现在 我可以从远程删除这些提交而不将拉取到本地
  • Git撤销本地分支删除

    我刚刚删除了错误的分支 并进行了一些我需要的实验性更改git branch D branchName 如何恢复分支 您可以使用git reflog http git scm com docs git reflog查找分支最后一次提交的 SH
  • 在 python 中找不到 git 可执行文件

    我试图使用访问密钥克隆 git 存储库 但是当我尝试运行它时 它抛出一个异常 说找不到 git 可执行文件 但我已经安装了 git 并且 in it py 显示了正确的路径 C Program Files Git bin 我还安装了 git
  • git merge --squash 和 gitcherry-pick 有什么区别?

    如果我在标准的主功能工作流程中工作 那么将功能分支压缩到主功能分支和将其挑选到主功能分支之间有什么区别 分支示例 m1 m2 master f1 f2 feature 我认为两者都有相同的输出 即 m1 m2 m3 master f1 f2
  • Git - 使用过滤器分支删除带有空变更集的提交

    如何使用 git filter branch 删除没有变更集的提交 我使用以下方法重写了我的 git 历史记录 git filter branch tree filter rm r f my folder f HEAD 效果很好 但现在我有
  • 是否可以使用“git gc”来打包引用日志对象?

    正如答案所暗示的https stackoverflow com a 32025729 https stackoverflow com a 32025729我已经配置了远程裸仓库 git config gc pruneExpire never
  • 我如何才能看到 Github 风格的东西,例如 git -repo 的打孔卡和时间线?

    我正在寻找一个可以可视化 git repo 工作的软件 我喜欢 Github 的一些功能和 Bitbucket 的一些功能 所以我不想使用它们 因为它们并不完美 我正在寻找创建类似视觉特征的方法 下面你可以找到一些部分 但仍然缺少很多谜题

随机推荐

  • centos mysql jar 驱动包_JDBC连接Mysql数据库详解

    JDBC Java DataBase Connectivity 即Java数据库连接 简而言之 就是通过Java语言来操作数据库 我们可以把JDBC理解成是官方定义的一套操作所有关系型数据库的规则 规则即接口 也就是说 官方定义了一套操作所
  • java实现单点登陆(SSO)

    java实现单点登陆 SSO 网络域名必须完全一致 才代表同一站点 域名映射 访问后面的 会跳转到前面 单点登陆概念 多系统 单一位置登录 实现多系统同时登陆 常出现在互联网和企业级平台中 单点登陆一般是用于互相授信的系统 实现单一位置登录
  • Unity Shader简介

    Shader 中文名为着色器 对很多开发者来说它是一个神秘的存在 想学但是又不知道如何去学 或者学了一段时间发现Get不到它的点 始终感觉游离在外 无法开窍 本文来讲下如何从零基础入门Shader 目的在于让初学Shader的程序或者美术可
  • C++ MyHttpServer网络服务器实验

    C MyHttpServer网络服务器实验 一 实验要求 二 文件夹管理 三 实验结果 四 程序代码 C 课程老师把这一个实验分成了五个小实验 VS版本是2019的 涉及Http协议的请求处理 响应处理 多线程等 有一两个实验老师的示例代码
  • 原理图改动后更新PCB报错的解决方法

    今天我在用Altium Designer 20绘制PCB时遇到了一个情况 在更改了原理图以后再进行Update PCB Document的时候软件会提示错误 截图如下 遇到这种情况时大家往往束手无策而选择重新建立一个空白的PCB板再去生成一
  • Spring MVC传递List类型参数报错:No primary or default constructor found for interface java.util.List]使用两种注解解决

    在测试GenericConverter传递List数组的时候 出现No primary or default constructor found for interface java util List with r这个错误 解决 因为报错
  • 单图像超分辨率重建总结

    单图像超分辨率重建总结 定义 单图像超分辨率重建 Single Image Super resolution Reconstruction SISR 旨在从给定的低分辨率 LR 图像中 重建含有清晰细节特征的高分辨率 HR 图像 是计算机视
  • vue和elementui实现多表格选择和查看已选的功能

    目录 功能描述 数据 HTML js CSS 功能描述 经常碰到需要写多个表格选择 并且可以查看已选项目的功能 实现功能大致如此 左侧是可选择的表 点击表展示每个表里可选字段 然后点击查看已选 可以展示以及选择的表格数据 如下图 涉及敏感字
  • BeanUtils应用,tojavabean

    package com bochy tojavabean import java util HashMap import java util Map import org apache commons beanutils locale co
  • 高清壁纸wallhaven.cc下载图片

    建议不要用多线程 设置延迟 不然会被封IP import requests import os import re import time from concurrent futures import ThreadPoolExecutor
  • GCN代码详解(SEMI-SUPERVISED CLASSIFICATION WITH GRAPH CONVOLUTIONAL NETWORKS(2017ICLR))

    不足之处请大家多多指点 文章目录 链接 代码详解 链接 论文题目 用图卷积网络进行自监督分类 GCN 2017ICLR 论文链接 1609 02907v3 pdf arxiv org 代码链接 tkipf pygcn Graph Convo
  • 总链接地址

    链接 达内博客 链接地址 程序媛泡泡 https blog csdn net weixin 43884234 cgblpx 皮皮虾 https blog csdn net u012932876 闪耀太阳 https blog csdn ne
  • python环境离线打包环境、离线环境迁移、离线环境复制、离线环境克隆

    我们经常使用conda来管理自己环境 时间久了 环境中的依赖错综复杂 有的通过pip或者conda下载 有的是离线安装 有的是通过魔法下载 这时候如果要将本机环境复制到另一台计算机中就会非常麻烦 甚至另一台计算机无法联网 这时候可以使用co
  • uni-app简单介绍

    uni app简单介绍 https uniapp dcloud io 一 什么是uni app uni app 是一个使用 Vue js 开发所有前端应用的框架 开发者编写一套代码 可发布到iOS Android Web 响应式 以及各种小
  • 转:Vue项目中的token验证登录(前端部分)

    声明 此文章是转载 2 问题 做一个登录界面 我选择的是用token进行验证登录 我用的前端框架是Vue js 和 element ui 如何在vue 中使用token进行验证登录 3 思考 1 利用token进行验证登录 用户进行登录操作
  • TF卡目录显示文件夹变0字节的方法

    关于电脑上的目录打不开是什么原因 电脑目录打不开是什么原因这个许多人还不清楚 今天小编来为大家解答目录打不开状况 此刻让好多人一起来瞧瞧吧 TF卡目录显示文件夹变0字节的方法 工具 软件 sayRecy 步骤1 先百度搜索并下载程序打开后
  • Python:赋值,copy和deepcopy区别

    参考 Python赋值 copy deepcopy区别 结论 copy 与deepcopy 之间的主要区别是python对数据的存储方式 python2中 需要import copy模块 python3中 直接可以使用copy 方法 但de
  • Postman —— postman实现参数化

    什么时候会用到参数化 比如 一个模块要用多组不同数据进行测试 验证业务的正确性 Login模块 正确的用户名 密码 成功 错误的用户名 正确的密码 失败 postman实现参数化 在实际的接口测试中 部分参数每次发送请求时都要唯一 比如注册
  • jacoco检测功能或自动化测试覆盖率

    参考文档 http t csdn cn QqCSh http t csdn cn HonVL 目录 下载jacoco 启动jacocoagent监控被测项目 执行手工测试 生成exec文件 生成report报告 jacoco代码覆盖率报告分
  • 【Hexo博客搭建】将其部署到GitHub Pages(二):如何初始化并部署?

    系列目录 Hexo博客搭建 将其部署到 GitHub Pages 一 前期要做哪些准备 Hexo博客搭建 将其部署到 GitHub Pages 二 如何初始化并部署 Hexo博客搭建 将其部署到 GitHub Pages 三 怎么写作以及更