P2P is a PAC team from GDUT.
官网:https://git-scm.com/downloads
配置及其他命令请参考:http://huihut.com/2017/01/24/GitNotes/
克隆 notes:以下两句任意执行一句(貌似 https 的更快)
git clone https://github.com/PAC-P2P/notes.git git clone git@github.com:PAC-P2P/notes.git 进入 notes 目录
cd notes 初始化 git
git init 安装依赖
npm install --unsafe-perm --verbose -g hexo # huihut 改为你的用户名 git branch huihut # huihut 改为你的分支名 git checkout huihut 修改 source/_posts 的文件
# 新建 .md 博文,名字为"FileName"(自己改) hexo new "FileName" hexo g git add . # "FileName" 写你做的修改 git commit -m "Add FileName" npm start # huihut 改为自己的分支 git push -u origin huihut # 把master分支合并到huihut分支 git merge master huihut 在 notes 同级目录下创建 temp 文件夹,用来存放git下来的最新博文
-
写好博文,并放到
notes/source/_posts下,使用Markdown写,可参考 Markdown 简易入门教程 -
到与
notes同级的temp下,删除之前git下来的旧notes,并克隆下最新工程:git clone https://github.com/PAC-P2P/notes.git -
拷贝
temp/notes/source/_posts下的最新博文(.md文件)到notes/source/_posts下,覆盖除了你刚写的博文外的其他博文 -
转换到
notes目录下 -
转换到你的分支
git checkout huihut -
构建静态文件
hexo g -
添加全部文件到本地仓库缓冲区
git add . -
将文件提交到本地仓库
# "FileName" 写你做的修改 git commit -m "Add FileName" -
将本地仓库的内容推送到远程仓库
# huihut 改为自己的分支 git push origin huihut -
分支合并
# 把master分支合并到huihut分支 git merge master huihut -
在 Github 上提交合并请求

