-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aacac83
commit b069cfc
Showing
5 changed files
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<!doctype html> | ||
<html lang="zh"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"><meta><title>在随便哪一台电脑上写博客?- Hexo 多端同步 - Yttr 的小站</title><link rel="manifest" href="/manifest.json"><meta name="application-name" content="Yttr 的小站"><meta name="msapplication-TileImage" content="/img/favicon.svg"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-title" content="Yttr 的小站"><meta name="apple-mobile-web-app-status-bar-style" content="default"><meta name="description" content="将 Github 运用到底! 再来个奇妙小仓库还是太麻烦了,我们使用分支功能。 启用同步在第一用户端的博客根目录下 Git Bash 新建一个仓库。 1git init 然后确保你的 .gitignore 文件里屏蔽了以下目录和文件的提交。 12&#x2F;.deploy_git &#x2F;public 添加该仓库到远程仓库列表: 12345git remote add origin [your github r"><meta property="og:type" content="blog"><meta property="og:title" content="在随便哪一台电脑上写博客?- Hexo 多端同步"><meta property="og:url" content="https://yttriumwillow.github.io/2023/11/04/%E5%9C%A8%E9%9A%8F%E4%BE%BF%E5%93%AA%E4%B8%80%E5%8F%B0%E7%94%B5%E8%84%91%E4%B8%8A%E5%86%99%E5%8D%9A%E5%AE%A2%EF%BC%9F-Hexo-%E5%A4%9A%E7%AB%AF%E5%90%8C%E6%AD%A5/"><meta property="og:site_name" content="Yttr 的小站"><meta property="og:description" content="将 Github 运用到底! 再来个奇妙小仓库还是太麻烦了,我们使用分支功能。 启用同步在第一用户端的博客根目录下 Git Bash 新建一个仓库。 1git init 然后确保你的 .gitignore 文件里屏蔽了以下目录和文件的提交。 12&#x2F;.deploy_git &#x2F;public 添加该仓库到远程仓库列表: 12345git remote add origin [your github r"><meta property="og:locale" content="zh_CN"><meta property="og:image" content="https://yttriumwillow.github.io/gallery/covers/20231102-2.jpg"><meta property="article:published_time" content="2023-11-04T03:00:11.000Z"><meta property="article:modified_time" content="2023-11-04T03:48:29.078Z"><meta property="article:author" content="YttriumWillow"><meta property="article:tag" content="博客"><meta property="twitter:card" content="summary"><meta property="twitter:image:src" content="https://yttriumwillow.github.io/gallery/covers/20231102-2.jpg"><script type="application/ld+json">{"@context":"https://schema.org","@type":"BlogPosting","mainEntityOfPage":{"@type":"WebPage","@id":"https://yttriumwillow.github.io/2023/11/04/%E5%9C%A8%E9%9A%8F%E4%BE%BF%E5%93%AA%E4%B8%80%E5%8F%B0%E7%94%B5%E8%84%91%E4%B8%8A%E5%86%99%E5%8D%9A%E5%AE%A2%EF%BC%9F-Hexo-%E5%A4%9A%E7%AB%AF%E5%90%8C%E6%AD%A5/"},"headline":"在随便哪一台电脑上写博客?- Hexo 多端同步","image":["https://yttriumwillow.github.io/gallery/covers/20231102-2.jpg"],"datePublished":"2023-11-04T03:00:11.000Z","dateModified":"2023-11-04T03:48:29.078Z","author":{"@type":"Person","name":"YttriumWillow"},"publisher":{"@type":"Organization","name":"Yttr 的小站","logo":{"@type":"ImageObject","url":"https://yttriumwillow.github.io/img/logo.svg"}},"description":"将 Github 运用到底! 再来个奇妙小仓库还是太麻烦了,我们使用分支功能。 启用同步在第一用户端的博客根目录下 Git Bash 新建一个仓库。 1git init 然后确保你的 .gitignore 文件里屏蔽了以下目录和文件的提交。 12/.deploy_git /public 添加该仓库到远程仓库列表: 12345git remote add origin [your github r"}</script><link rel="canonical" href="https://yttriumwillow.github.io/2023/11/04/%E5%9C%A8%E9%9A%8F%E4%BE%BF%E5%93%AA%E4%B8%80%E5%8F%B0%E7%94%B5%E8%84%91%E4%B8%8A%E5%86%99%E5%8D%9A%E5%AE%A2%EF%BC%9F-Hexo-%E5%A4%9A%E7%AB%AF%E5%90%8C%E6%AD%A5/"><link rel="alternate" href="/atom.xml" title="Yttr 的小站" type="application/atom+xml"><link rel="icon" href="/img/favicon.svg"><link rel="stylesheet" href="https://use.fontawesome.com/releases/v6.0.0/css/all.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/styles/atom-one-light.css"><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;600&family=Source+Code+Pro"><link rel="stylesheet" href="/css/default.css"><style>body>.footer,body>.navbar,body>.section{opacity:0}</style><!--!--><!--!--><!--!--><!--!--><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/build/cookieconsent.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/lightgallery.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/justifiedGallery.min.css"><!--!--><!--!--><!--!--><style>.pace{-webkit-pointer-events:none;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.pace-inactive{display:none}.pace .pace-progress{background:#3273dc;position:fixed;z-index:2000;top:0;right:100%;width:100%;height:2px}</style><script src="https://cdn.jsdelivr.net/npm/[email protected]/pace.min.js"></script><!--!--><!--!--><meta name="follow.it-verification-code" content="FCEfYnwW6T3f48k5bHPJ"><!-- hexo injector head_end start --> | ||
<html lang="zh"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"><meta><title>在随便哪一台电脑上写博客?- Hexo 多端同步 - Yttr 的小站</title><link rel="manifest" href="/manifest.json"><meta name="application-name" content="Yttr 的小站"><meta name="msapplication-TileImage" content="/img/favicon.svg"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-title" content="Yttr 的小站"><meta name="apple-mobile-web-app-status-bar-style" content="default"><meta name="description" content="将 Github 运用到底! 再来个奇妙小仓库还是太麻烦了,我们使用分支功能。 启用同步在第一用户端的博客根目录下 Git Bash 新建一个仓库。 1git init 然后确保你的 .gitignore 文件里屏蔽了以下目录和文件的提交。 12&#x2F;.deploy_git &#x2F;public 添加该仓库到远程仓库列表: 12345git remote add origin [your github r"><meta property="og:type" content="blog"><meta property="og:title" content="在随便哪一台电脑上写博客?- Hexo 多端同步"><meta property="og:url" content="https://yttriumwillow.github.io/2023/11/04/%E5%9C%A8%E9%9A%8F%E4%BE%BF%E5%93%AA%E4%B8%80%E5%8F%B0%E7%94%B5%E8%84%91%E4%B8%8A%E5%86%99%E5%8D%9A%E5%AE%A2%EF%BC%9F-Hexo-%E5%A4%9A%E7%AB%AF%E5%90%8C%E6%AD%A5/"><meta property="og:site_name" content="Yttr 的小站"><meta property="og:description" content="将 Github 运用到底! 再来个奇妙小仓库还是太麻烦了,我们使用分支功能。 启用同步在第一用户端的博客根目录下 Git Bash 新建一个仓库。 1git init 然后确保你的 .gitignore 文件里屏蔽了以下目录和文件的提交。 12&#x2F;.deploy_git &#x2F;public 添加该仓库到远程仓库列表: 12345git remote add origin [your github r"><meta property="og:locale" content="zh_CN"><meta property="og:image" content="https://yttriumwillow.github.io/gallery/covers/20231102-2.jpg"><meta property="article:published_time" content="2023-11-04T03:00:11.000Z"><meta property="article:modified_time" content="2023-11-04T04:20:43.696Z"><meta property="article:author" content="YttriumWillow"><meta property="article:tag" content="博客"><meta property="twitter:card" content="summary"><meta property="twitter:image:src" content="https://yttriumwillow.github.io/gallery/covers/20231102-2.jpg"><script type="application/ld+json">{"@context":"https://schema.org","@type":"BlogPosting","mainEntityOfPage":{"@type":"WebPage","@id":"https://yttriumwillow.github.io/2023/11/04/%E5%9C%A8%E9%9A%8F%E4%BE%BF%E5%93%AA%E4%B8%80%E5%8F%B0%E7%94%B5%E8%84%91%E4%B8%8A%E5%86%99%E5%8D%9A%E5%AE%A2%EF%BC%9F-Hexo-%E5%A4%9A%E7%AB%AF%E5%90%8C%E6%AD%A5/"},"headline":"在随便哪一台电脑上写博客?- Hexo 多端同步","image":["https://yttriumwillow.github.io/gallery/covers/20231102-2.jpg"],"datePublished":"2023-11-04T03:00:11.000Z","dateModified":"2023-11-04T04:20:43.696Z","author":{"@type":"Person","name":"YttriumWillow"},"publisher":{"@type":"Organization","name":"Yttr 的小站","logo":{"@type":"ImageObject","url":"https://yttriumwillow.github.io/img/logo.svg"}},"description":"将 Github 运用到底! 再来个奇妙小仓库还是太麻烦了,我们使用分支功能。 启用同步在第一用户端的博客根目录下 Git Bash 新建一个仓库。 1git init 然后确保你的 .gitignore 文件里屏蔽了以下目录和文件的提交。 12/.deploy_git /public 添加该仓库到远程仓库列表: 12345git remote add origin [your github r"}</script><link rel="canonical" href="https://yttriumwillow.github.io/2023/11/04/%E5%9C%A8%E9%9A%8F%E4%BE%BF%E5%93%AA%E4%B8%80%E5%8F%B0%E7%94%B5%E8%84%91%E4%B8%8A%E5%86%99%E5%8D%9A%E5%AE%A2%EF%BC%9F-Hexo-%E5%A4%9A%E7%AB%AF%E5%90%8C%E6%AD%A5/"><link rel="alternate" href="/atom.xml" title="Yttr 的小站" type="application/atom+xml"><link rel="icon" href="/img/favicon.svg"><link rel="stylesheet" href="https://use.fontawesome.com/releases/v6.0.0/css/all.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/styles/atom-one-light.css"><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;600&family=Source+Code+Pro"><link rel="stylesheet" href="/css/default.css"><style>body>.footer,body>.navbar,body>.section{opacity:0}</style><!--!--><!--!--><!--!--><!--!--><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/build/cookieconsent.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/lightgallery.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/justifiedGallery.min.css"><!--!--><!--!--><!--!--><style>.pace{-webkit-pointer-events:none;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.pace-inactive{display:none}.pace .pace-progress{background:#3273dc;position:fixed;z-index:2000;top:0;right:100%;width:100%;height:2px}</style><script src="https://cdn.jsdelivr.net/npm/[email protected]/pace.min.js"></script><!--!--><!--!--><meta name="follow.it-verification-code" content="FCEfYnwW6T3f48k5bHPJ"><!-- hexo injector head_end start --> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css"> | ||
<script> | ||
(function () { | ||
|
@@ -31,7 +31,7 @@ | |
switchTab(); | ||
window.addEventListener('hashchange', switchTab, false); | ||
})(); | ||
</script><!-- hexo injector head_end end --><meta name="generator" content="Hexo 6.3.0"></head><body class="is-3-column"><nav class="navbar navbar-main"><div class="container navbar-container"><div class="navbar-brand justify-content-center"><a class="navbar-item navbar-logo" href="/"><img src="/img/logo.svg" alt="Yttr 的小站" height="28"></a></div><div class="navbar-menu"><div class="navbar-start"><a class="navbar-item" href="/">Home</a><a class="navbar-item" href="/archives">Archives</a><a class="navbar-item" href="/categories">Categories</a><a class="navbar-item" href="/tags">Tags</a><a class="navbar-item" href="/about">About</a></div><div class="navbar-end"><a class="navbar-item" target="_blank" rel="noopener" title="Blog GitHub Repository" href="https://yttriumwillow.github.io/"><i class="fab fa-github"></i></a><a class="navbar-item search" title="搜索" href="javascript:;"><i class="fas fa-search"></i></a></div></div></div></nav><section class="section"><div class="container"><div class="columns"><div class="column order-2 column-main is-8-tablet is-8-desktop is-6-widescreen"><div class="card"><div class="card-image"><span class="image is-7by3"><img class="fill" src="/gallery/covers/20231102-2.jpg" alt="在随便哪一台电脑上写博客?- Hexo 多端同步"></span></div><article class="card-content article" role="article"><div class="article-meta is-size-7 is-uppercase level is-mobile"><div class="level-left"><span class="level-item"><time dateTime="2023-11-04T03:00:11.000Z" title="2023/11/4 11:00:11">2023-11-04</time>发表</span><span class="level-item"><time dateTime="2023-11-04T03:48:29.078Z" title="2023/11/4 11:48:29">2023-11-04</time>更新</span><span class="level-item">3 分钟读完 (大约473个字)</span></div></div><h1 class="title is-3 is-size-4-mobile">在随便哪一台电脑上写博客?- Hexo 多端同步</h1><div class="content"><p>将 Github 运用到底!</p> | ||
</script><!-- hexo injector head_end end --><meta name="generator" content="Hexo 6.3.0"></head><body class="is-3-column"><nav class="navbar navbar-main"><div class="container navbar-container"><div class="navbar-brand justify-content-center"><a class="navbar-item navbar-logo" href="/"><img src="/img/logo.svg" alt="Yttr 的小站" height="28"></a></div><div class="navbar-menu"><div class="navbar-start"><a class="navbar-item" href="/">Home</a><a class="navbar-item" href="/archives">Archives</a><a class="navbar-item" href="/categories">Categories</a><a class="navbar-item" href="/tags">Tags</a><a class="navbar-item" href="/about">About</a></div><div class="navbar-end"><a class="navbar-item" target="_blank" rel="noopener" title="Blog GitHub Repository" href="https://yttriumwillow.github.io/"><i class="fab fa-github"></i></a><a class="navbar-item search" title="搜索" href="javascript:;"><i class="fas fa-search"></i></a></div></div></div></nav><section class="section"><div class="container"><div class="columns"><div class="column order-2 column-main is-8-tablet is-8-desktop is-6-widescreen"><div class="card"><div class="card-image"><span class="image is-7by3"><img class="fill" src="/gallery/covers/20231102-2.jpg" alt="在随便哪一台电脑上写博客?- Hexo 多端同步"></span></div><article class="card-content article" role="article"><div class="article-meta is-size-7 is-uppercase level is-mobile"><div class="level-left"><span class="level-item"><time dateTime="2023-11-04T03:00:11.000Z" title="2023/11/4 11:00:11">2023-11-04</time>发表</span><span class="level-item"><time dateTime="2023-11-04T04:20:43.696Z" title="2023/11/4 12:20:43">2023-11-04</time>更新</span><span class="level-item">3 分钟读完 (大约474个字)</span></div></div><h1 class="title is-3 is-size-4-mobile">在随便哪一台电脑上写博客?- Hexo 多端同步</h1><div class="content"><p>将 Github 运用到底!</p> | ||
<p>再来个奇妙小仓库还是太麻烦了,我们使用分支功能。</p> | ||
<h3 id="启用同步"><a href="#启用同步" class="headerlink" title="启用同步"></a>启用同步</h3><p>在第一用户端的博客根目录下 Git Bash 新建一个仓库。</p> | ||
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git init</span><br></pre></td></tr></table></figure> | ||
|
@@ -42,7 +42,7 @@ <h3 id="启用同步"><a href="#启用同步" class="headerlink" title="启用 | |
<p>一路提交更改到 <code>hexo</code> 分支。</p> | ||
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">git add . <span class="comment"># 将变更添加到 git 暂存区 </span></span><br><span class="line">git commit -m <span class="string">"[comment]"</span> <span class="comment"># 提交本次更改,并附加提交信息</span></span><br><span class="line">git push origin main:hexo <span class="comment"># 将本地 main 分支的提交发布到远程仓库的 hexo 分支</span></span><br><span class="line"><span class="comment"># 我为了省事用的 main 主分支,有的仓库的默认分支可能是 master</span></span><br></pre></td></tr></table></figure> | ||
<p>你的 Github 仓库里面就会出现这个分支。</p> | ||
<p>![[/img/20231104/your-github-displays.png]]</p> | ||
<p><img src="/img/20231104/your-github-displays.png" alt="img"></p> | ||
<h3 id="在其他设备上同步"><a href="#在其他设备上同步" class="headerlink" title="在其他设备上同步"></a>在其他设备上同步</h3><p>如果这是一台全新的设备, 请先安装 Git, Node.js 并更新 npm。</p> | ||
<p>打开你需要同步该文件的目录并启动终端。</p> | ||
<p>使用 Git 同步:</p> | ||
|
Oops, something went wrong.